Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b53f8786
Commit
b53f8786
authored
Apr 08, 2004
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 08, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add WM_SETREDRAW test.
parent
d1e1bcb9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
1 deletion
+49
-1
msg.c
dlls/user/tests/msg.c
+49
-1
No files found.
dlls/user/tests/msg.c
View file @
b53f8786
...
...
@@ -401,6 +401,18 @@ static const struct message WmSetMenuVisibleNoSizeChangeSeq[] = {
{
0
}
};
static
const
struct
message
WmSetRedrawFalseSeq
[]
=
{
{
WM_SETREDRAW
,
sent
|
wparam
,
0
},
{
0
}
};
static
const
struct
message
WmSetRedrawTrueSeq
[]
=
{
{
WM_SETREDRAW
,
sent
|
wparam
,
1
},
{
0
}
};
static
int
sequence_cnt
,
sequence_size
;
static
struct
message
*
sequence
;
...
...
@@ -492,6 +504,31 @@ static void ok_sequence(const struct message *expected, const char *context)
flush_sequence
();
}
static
void
test_WM_SETREDRAW
(
HWND
hwnd
)
{
DWORD
style
=
GetWindowLongA
(
hwnd
,
GWL_STYLE
);
flush_sequence
();
SendMessageA
(
hwnd
,
WM_SETREDRAW
,
FALSE
,
0
);
ok_sequence
(
WmSetRedrawFalseSeq
,
"SetRedraw:FALSE"
);
ok
(
!
(
GetWindowLongA
(
hwnd
,
GWL_STYLE
)
&
WS_VISIBLE
),
"WS_VISIBLE should NOT be set
\n
"
);
ok
(
!
IsWindowVisible
(
hwnd
),
"IsWindowVisible() should return FALSE
\n
"
);
flush_sequence
();
SendMessageA
(
hwnd
,
WM_SETREDRAW
,
TRUE
,
0
);
ok_sequence
(
WmSetRedrawTrueSeq
,
"SetRedraw:TRUE"
);
ok
(
GetWindowLongA
(
hwnd
,
GWL_STYLE
)
&
WS_VISIBLE
,
"WS_VISIBLE should be set
\n
"
);
ok
(
IsWindowVisible
(
hwnd
),
"IsWindowVisible() should return TRUE"
);
/* restore original WS_VISIBLE state */
SetWindowLongA
(
hwnd
,
GWL_STYLE
,
style
);
flush_sequence
();
}
/* test if we receive the right sequence of messages */
static
void
test_messages
(
void
)
{
...
...
@@ -503,10 +540,16 @@ static void test_messages(void)
100
,
100
,
200
,
200
,
0
,
0
,
0
,
NULL
);
ok
(
hwnd
!=
0
,
"Failed to create overlapped window
\n
"
);
ok_sequence
(
WmCreateOverlappedSeq
,
"CreateWindow:overlapped"
);
/* test WM_SETREDRAW on a not visible top level window */
test_WM_SETREDRAW
(
hwnd
);
ShowWindow
(
hwnd
,
SW_SHOW
);
ok_sequence
(
WmShowOverlappedSeq
,
"ShowWindow:overlapped"
);
/* test WM_SETREDRAW on a visible top level window */
test_WM_SETREDRAW
(
hwnd
);
DestroyWindow
(
hwnd
);
ok_sequence
(
WmDestroyOverlappedSeq
,
"DestroyWindow:overlapped"
);
...
...
@@ -528,11 +571,16 @@ static void test_messages(void)
hbutton
=
CreateWindowExA
(
0
,
"TestWindowClass"
,
"Test button"
,
WS_CHILDWINDOW
,
0
,
100
,
50
,
50
,
hchild
,
0
,
0
,
NULL
);
ok
(
hbutton
!=
0
,
"Failed to create button window
\n
"
);
flush_sequence
();
/* test WM_SETREDRAW on a not visible child window */
test_WM_SETREDRAW
(
hchild
);
ShowWindow
(
hchild
,
SW_SHOW
);
ok_sequence
(
WmShowChildSeq
,
"ShowWindow:child"
);
/* test WM_SETREDRAW on a visible child window */
test_WM_SETREDRAW
(
hchild
);
SetFocus
(
hchild
);
flush_sequence
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment