Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
08f60ee9
Commit
08f60ee9
authored
Oct 07, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Test window style in HCBT_CREATEWND hook.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a9eee150
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
1 deletion
+34
-1
win.c
dlls/user32/tests/win.c
+34
-1
No files found.
dlls/user32/tests/win.c
View file @
08f60ee9
...
...
@@ -4432,6 +4432,35 @@ typedef struct
DWORD
exstyle
;
}
test_style
;
static
LRESULT
WINAPI
cbt_proc
(
int
ncode
,
WPARAM
wparam
,
LPARAM
lparam
)
{
CBT_CREATEWNDW
*
c
=
(
CBT_CREATEWNDW
*
)
lparam
;
HWND
hwnd
=
(
HWND
)
wparam
;
test_style
*
ts
;
DWORD
style
;
if
(
ncode
!=
HCBT_CREATEWND
)
return
CallNextHookEx
(
NULL
,
ncode
,
wparam
,
lparam
);
ts
=
c
->
lpcs
->
lpCreateParams
;
ok
(
ts
!=
NULL
,
"lpCreateParams not set
\n
"
);
todo_wine_if
(
!
(
ts
->
cs_style
&
WS_CHILD
)
||
(
ts
->
cs_style
&
WS_POPUP
))
ok
(
c
->
lpcs
->
style
==
ts
->
cs_style
,
"style = 0x%08x, expected 0x%08x
\n
"
,
c
->
lpcs
->
style
,
ts
->
cs_style
);
ok
(
c
->
lpcs
->
dwExStyle
==
ts
->
cs_exstyle
,
"exstyle = 0x%08x, expected 0x%08x
\n
"
,
c
->
lpcs
->
dwExStyle
,
ts
->
cs_exstyle
);
style
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
todo_wine_if
(
!
(
ts
->
cs_style
&
WS_CHILD
)
||
(
ts
->
cs_style
&
WS_POPUP
))
ok
(
style
==
ts
->
cs_style
,
"style = 0x%08x, expected 0x%08x
\n
"
,
style
,
ts
->
cs_style
);
style
=
GetWindowLongW
(
hwnd
,
GWL_EXSTYLE
);
todo_wine_if
(
ts
->
exstyle
!=
ts
->
cs_exstyle
)
ok
(
style
==
(
ts
->
cs_exstyle
&
~
WS_EX_LAYERED
),
"exstyle = 0x%08x, expected 0x%08x
\n
"
,
style
,
ts
->
cs_exstyle
);
return
CallNextHookEx
(
NULL
,
ncode
,
wparam
,
lparam
);
}
static
LRESULT
WINAPI
StyleCheckProc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
CREATESTRUCTA
*
cs
;
...
...
@@ -4491,6 +4520,7 @@ static void check_window_style(DWORD dwStyleIn, DWORD dwExStyleIn, DWORD dwStyle
test_style
ts
;
HWND
hwnd
;
HWND
hwndParent
=
NULL
;
HHOOK
hook
;
ts
.
cs_style
=
dwStyleIn
;
ts
.
cs_exstyle
=
dwExStyleIn
;
...
...
@@ -4507,11 +4537,14 @@ static void check_window_style(DWORD dwStyleIn, DWORD dwExStyleIn, DWORD dwStyle
{
hwndParent
=
CreateWindowExA
(
0
,
"static"
,
NULL
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
0
,
0
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hwndParent
!=
NULL
,
"CreateWindowExA failed
\n
"
);
}
hook
=
SetWindowsHookExW
(
WH_CBT
,
cbt_proc
,
0
,
GetCurrentThreadId
());
hwnd
=
CreateWindowExA
(
dwExStyleIn
,
(
LPCSTR
)
MAKEINTATOM
(
atomStyleCheckClass
),
NULL
,
dwStyleIn
,
0
,
0
,
0
,
0
,
hwndParent
,
NULL
,
NULL
,
&
ts
);
assert
(
hwnd
);
ok
(
hwnd
!=
NULL
,
"CreateWindowExA failed
\n
"
);
UnhookWindowsHookEx
(
hook
);
flush_events
(
TRUE
);
...
...
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