Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
1a65e209
Commit
1a65e209
authored
Apr 04, 2011
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Add a test for WM_QUIT handling by DefDlgProc.
parent
6fcad42e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
msg.c
dlls/user32/tests/msg.c
+60
-0
No files found.
dlls/user32/tests/msg.c
View file @
1a65e209
...
...
@@ -10026,6 +10026,50 @@ done:
flush_events
();
}
static
INT_PTR
CALLBACK
wm_quit_dlg_proc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wp
,
LPARAM
lp
)
{
struct
recvd_message
msg
;
if
(
ignore_message
(
message
))
return
0
;
msg
.
hwnd
=
hwnd
;
msg
.
message
=
message
;
msg
.
flags
=
sent
|
wparam
|
lparam
;
msg
.
wParam
=
wp
;
msg
.
lParam
=
lp
;
msg
.
descr
=
"dialog"
;
add_message
(
&
msg
);
switch
(
message
)
{
case
WM_INITDIALOG
:
PostMessage
(
hwnd
,
WM_QUIT
,
0x1234
,
0x5678
);
PostMessage
(
hwnd
,
WM_USER
,
0xdead
,
0xbeef
);
return
0
;
case
WM_GETDLGCODE
:
return
0
;
case
WM_USER
:
EndDialog
(
hwnd
,
0
);
break
;
}
return
1
;
}
static
const
struct
message
WmQuitDialogSeq
[]
=
{
{
HCBT_CREATEWND
,
hook
},
{
WM_SETFONT
,
sent
},
{
WM_INITDIALOG
,
sent
},
{
WM_CHANGEUISTATE
,
sent
|
optional
},
{
HCBT_DESTROYWND
,
hook
},
{
0x0090
,
sent
|
optional
},
/* Vista */
{
WM_DESTROY
,
sent
},
{
WM_NCDESTROY
,
sent
},
{
0
}
};
static
void
test_quit_message
(
void
)
{
MSG
msg
;
...
...
@@ -10076,6 +10120,22 @@ static void test_quit_message(void)
ret
=
GetMessage
(
&
msg
,
NULL
,
0
,
0
);
ok
(
ret
>
0
,
"GetMessage failed with error %d
\n
"
,
GetLastError
());
ok
(
msg
.
message
==
WM_USER
,
"Received message 0x%04x instead of WM_USER
\n
"
,
msg
.
message
);
flush_events
();
flush_sequence
();
ret
=
DialogBoxParam
(
GetModuleHandle
(
0
),
"TEST_EMPTY_DIALOG"
,
0
,
wm_quit_dlg_proc
,
0
);
todo_wine
ok
(
ret
==
1
,
"expected 1, got %d
\n
"
,
ret
);
ok_sequence
(
WmQuitDialogSeq
,
"WmQuitDialogSeq"
,
TRUE
);
memset
(
&
msg
,
0xab
,
sizeof
(
msg
));
ret
=
PeekMessage
(
&
msg
,
NULL
,
0
,
0
,
PM_REMOVE
);
todo_wine
ok
(
ret
,
"PeekMessage failed
\n
"
);
if
(
ret
)
{
ok
(
msg
.
message
==
WM_QUIT
,
"Received message 0x%04x instead of WM_QUIT
\n
"
,
msg
.
message
);
ok
(
msg
.
wParam
==
0x1234
,
"wParam was 0x%lx instead of 0x1234
\n
"
,
msg
.
wParam
);
ok
(
msg
.
lParam
==
0
,
"lParam was 0x%lx instead of 0
\n
"
,
msg
.
lParam
);
}
}
static
const
struct
message
WmMouseHoverSeq
[]
=
{
...
...
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