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
ce3efca2
Commit
ce3efca2
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 style returned by GetWindowLong in WM_CREATE.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0483e2b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
26 deletions
+39
-26
win.c
dlls/user32/tests/win.c
+39
-26
No files found.
dlls/user32/tests/win.c
View file @
ce3efca2
...
...
@@ -4424,34 +4424,39 @@ static void test_SetParent(void)
ok
(
!
IsWindow
(
popup
),
"popup still exists
\n
"
);
}
typedef
struct
{
DWORD
cs_style
;
DWORD
cs_exstyle
;
DWORD
style
;
DWORD
exstyle
;
}
test_style
;
static
LRESULT
WINAPI
StyleCheckProc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
LPCREATESTRUCTA
lpcs
;
LPSTYLESTRUCT
lpss
;
CREATESTRUCTA
*
cs
;
test_style
*
ts
;
DWORD
style
;
switch
(
msg
)
{
case
WM_NCCREATE
:
case
WM_CREATE
:
lpcs
=
(
LPCREATESTRUCTA
)
lparam
;
lpss
=
lpcs
->
lpCreateParams
;
if
(
lpss
)
{
if
((
lpcs
->
dwExStyle
&
WS_EX_DLGMODALFRAME
)
||
((
!
(
lpcs
->
dwExStyle
&
WS_EX_STATICEDGE
))
&&
(
lpcs
->
style
&
(
WS_DLGFRAME
|
WS_THICKFRAME
))))
ok
(
lpcs
->
dwExStyle
&
WS_EX_WINDOWEDGE
,
"Window should have WS_EX_WINDOWEDGE style
\n
"
);
else
ok
(
!
(
lpcs
->
dwExStyle
&
WS_EX_WINDOWEDGE
),
"Window shouldn't have WS_EX_WINDOWEDGE style
\n
"
);
ok
((
lpss
->
styleOld
&
~
WS_EX_WINDOWEDGE
)
==
(
lpcs
->
dwExStyle
&
~
WS_EX_WINDOWEDGE
),
"Ex style (0x%08x) should match what the caller passed to CreateWindowEx (0x%08x)
\n
"
,
lpss
->
styleOld
,
lpcs
->
dwExStyle
);
ok
(
lpss
->
styleNew
==
lpcs
->
style
,
"Style (0x%08x) should match what the caller passed to CreateWindowEx (0x%08x)
\n
"
,
lpss
->
styleNew
,
lpcs
->
style
);
}
cs
=
(
LPCREATESTRUCTA
)
lparam
;
ts
=
cs
->
lpCreateParams
;
ok
(
ts
!=
NULL
,
"lpCreateParams not set
\n
"
);
ok
(
cs
->
style
==
ts
->
cs_style
,
"style = 0x%08x, expected 0x%08x
\n
"
,
cs
->
style
,
ts
->
cs_style
);
ok
(
cs
->
dwExStyle
==
ts
->
cs_exstyle
,
"exstyle = 0x%08x, expected 0x%08x
\n
"
,
cs
->
dwExStyle
,
ts
->
cs_exstyle
);
style
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
ok
(
style
==
ts
->
style
,
"style = 0x%08x, expected 0x%08x
\n
"
,
style
,
ts
->
style
);
style
=
GetWindowLongW
(
hwnd
,
GWL_EXSTYLE
);
ok
(
style
==
ts
->
exstyle
,
"exstyle = 0x%08x, expected 0x%08x
\n
"
,
style
,
ts
->
exstyle
);
break
;
}
return
DefWindowProcA
(
hwnd
,
msg
,
wparam
,
lparam
);
...
...
@@ -4483,21 +4488,29 @@ static void check_window_style(DWORD dwStyleIn, DWORD dwExStyleIn, DWORD dwStyle
{
DWORD
dwActualStyle
;
DWORD
dwActualExStyle
;
STYLESTRUCT
s
s
;
test_style
t
s
;
HWND
hwnd
;
HWND
hwndParent
=
NULL
;
ss
.
styleNew
=
dwStyleIn
;
ss
.
styleOld
=
dwExStyleIn
;
ts
.
cs_style
=
dwStyleIn
;
ts
.
cs_exstyle
=
dwExStyleIn
;
if
((
dwExStyleIn
&
WS_EX_DLGMODALFRAME
)
||
((
!
(
dwExStyleIn
&
WS_EX_STATICEDGE
))
&&
(
dwStyleIn
&
(
WS_DLGFRAME
|
WS_THICKFRAME
))))
ts
.
cs_exstyle
|=
WS_EX_WINDOWEDGE
;
else
ts
.
cs_exstyle
&=
~
WS_EX_WINDOWEDGE
;
ts
.
style
=
dwStyleOut
;
ts
.
exstyle
=
dwExStyleOut
;
if
(
dwStyleIn
&
WS_CHILD
)
{
hwndParent
=
CreateWindowExA
(
0
,
(
LPCSTR
)
MAKEINTATOM
(
atomStyleCheckClass
)
,
NULL
,
hwndParent
=
CreateWindowExA
(
0
,
"static"
,
NULL
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
0
,
0
,
NULL
,
NULL
,
NULL
,
NULL
);
}
hwnd
=
CreateWindowExA
(
dwExStyleIn
,
(
LPCSTR
)
MAKEINTATOM
(
atomStyleCheckClass
),
NULL
,
dwStyleIn
,
0
,
0
,
0
,
0
,
hwndParent
,
NULL
,
NULL
,
&
s
s
);
dwStyleIn
,
0
,
0
,
0
,
0
,
hwndParent
,
NULL
,
NULL
,
&
t
s
);
assert
(
hwnd
);
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