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
18cf85a3
Commit
18cf85a3
authored
May 06, 2020
by
Zhiyi Zhang
Committed by
Alexandre Julliard
May 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Test button styles.
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f671b524
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
msg.c
dlls/user32/tests/msg.c
+33
-0
No files found.
dlls/user32/tests/msg.c
View file @
18cf85a3
...
...
@@ -31,6 +31,7 @@
#include "winuser.h"
#include "winnls.h"
#include "dbt.h"
#include "commctrl.h"
#include "wine/test.h"
...
...
@@ -17881,6 +17882,37 @@ static void test_invalid_window(void)
ok
(
GetLastError
()
==
ERROR_INVALID_WINDOW_HANDLE
,
"wrong error %u
\n
"
,
GetLastError
());
}
static
void
test_button_style
(
void
)
{
DWORD
type
,
expected_type
;
HWND
button
;
LRESULT
ret
;
DWORD
i
,
j
;
for
(
i
=
BS_PUSHBUTTON
;
i
<=
BS_DEFCOMMANDLINK
;
++
i
)
{
button
=
CreateWindowA
(
WC_BUTTONA
,
"test"
,
i
,
0
,
0
,
50
,
50
,
NULL
,
0
,
0
,
NULL
);
ok
(
button
!=
NULL
,
"Expected button not null.
\n
"
);
type
=
GetWindowLongW
(
button
,
GWL_STYLE
)
&
BS_TYPEMASK
;
expected_type
=
(
i
==
BS_USERBUTTON
?
BS_PUSHBUTTON
:
i
);
ok
(
type
==
expected_type
,
"Expected type %#x, got %#x.
\n
"
,
expected_type
,
type
);
for
(
j
=
BS_PUSHBUTTON
;
j
<=
BS_DEFCOMMANDLINK
;
++
j
)
{
ret
=
SendMessageA
(
button
,
BM_SETSTYLE
,
j
,
FALSE
);
ok
(
ret
==
0
,
"Expected %#x, got %#lx.
\n
"
,
0
,
ret
);
type
=
GetWindowLongW
(
button
,
GWL_STYLE
)
&
BS_TYPEMASK
;
expected_type
=
j
;
ok
(
type
==
expected_type
,
"Original type %#x, expected new type %#x, got %#x.
\n
"
,
i
,
expected_type
,
type
);
}
DestroyWindow
(
button
);
}
}
START_TEST
(
msg
)
{
char
**
test_argv
;
...
...
@@ -17964,6 +17996,7 @@ START_TEST(msg)
test_mdi_messages
();
test_button_messages
();
test_button_bm_get_set_image
();
test_button_style
();
test_autoradio_BM_CLICK
();
test_autoradio_kbd_move
();
test_static_messages
();
...
...
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