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
18b5cc5e
Commit
18b5cc5e
authored
Nov 08, 2022
by
Santino Mazza
Committed by
Alexandre Julliard
Nov 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Test for MB_SYSTEMMODAL.
parent
92e4cad8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
dialog.c
dlls/user32/tests/dialog.c
+26
-0
No files found.
dlls/user32/tests/dialog.c
View file @
18b5cc5e
...
...
@@ -2151,6 +2151,25 @@ static LRESULT CALLBACK msgbox_hook_proc(INT code, WPARAM wParam, LPARAM lParam)
return
CallNextHookEx
(
NULL
,
code
,
wParam
,
lParam
);
}
static
LRESULT
CALLBACK
msgbox_sysmodal_hook_proc
(
INT
code
,
WPARAM
wParam
,
LPARAM
lParam
)
{
if
(
code
==
HCBT_ACTIVATE
)
{
HWND
msgbox
=
(
HWND
)
wParam
;
LONG
exstyles
=
GetWindowLongA
(
msgbox
,
GWL_EXSTYLE
);
if
(
msgbox
)
{
todo_wine
ok
(
exstyles
&
WS_EX_TOPMOST
,
"expected message box to have topmost exstyle set
\n
"
);
SendDlgItemMessageA
(
msgbox
,
IDCANCEL
,
WM_LBUTTONDOWN
,
0
,
0
);
SendDlgItemMessageA
(
msgbox
,
IDCANCEL
,
WM_LBUTTONUP
,
0
,
0
);
}
}
return
CallNextHookEx
(
NULL
,
code
,
wParam
,
lParam
);
}
static
void
test_MessageBox
(
void
)
{
HHOOK
hook
;
...
...
@@ -2162,6 +2181,13 @@ static void test_MessageBox(void)
ok
(
ret
==
IDCANCEL
,
"got %d
\n
"
,
ret
);
UnhookWindowsHookEx
(
hook
);
/* Test for MB_SYSTEMMODAL */
hook
=
SetWindowsHookExA
(
WH_CBT
,
msgbox_sysmodal_hook_proc
,
NULL
,
GetCurrentThreadId
());
MessageBoxA
(
NULL
,
NULL
,
"system modal"
,
MB_OKCANCEL
|
MB_SYSTEMMODAL
);
UnhookWindowsHookEx
(
hook
);
}
static
INT_PTR
CALLBACK
custom_test_dialog_proc
(
HWND
hdlg
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
...
...
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