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
bf152cb0
Commit
bf152cb0
authored
Feb 07, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/button: Fix dialog code for new button types.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fc3ea7d1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
+30
-2
button.c
dlls/comctl32/button.c
+4
-0
button.c
dlls/comctl32/tests/button.c
+26
-2
No files found.
dlls/comctl32/button.c
View file @
bf152cb0
...
...
@@ -237,12 +237,16 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
case
WM_GETDLGCODE
:
switch
(
btn_type
)
{
case
BS_COMMANDLINK
:
case
BS_USERBUTTON
:
case
BS_PUSHBUTTON
:
return
DLGC_BUTTON
|
DLGC_UNDEFPUSHBUTTON
;
case
BS_DEFCOMMANDLINK
:
case
BS_DEFPUSHBUTTON
:
return
DLGC_BUTTON
|
DLGC_DEFPUSHBUTTON
;
case
BS_RADIOBUTTON
:
case
BS_AUTORADIOBUTTON
:
return
DLGC_BUTTON
|
DLGC_RADIOBUTTON
;
case
BS_GROUPBOX
:
return
DLGC_STATIC
;
case
BS_SPLITBUTTON
:
return
DLGC_BUTTON
|
DLGC_UNDEFPUSHBUTTON
|
DLGC_WANTARROWS
;
case
BS_DEFSPLITBUTTON
:
return
DLGC_BUTTON
|
DLGC_DEFPUSHBUTTON
|
DLGC_WANTARROWS
;
default:
return
DLGC_BUTTON
;
}
...
...
dlls/comctl32/tests/button.c
View file @
bf152cb0
...
...
@@ -511,6 +511,18 @@ static void test_button_messages(void)
{
BS_OWNERDRAW
,
DLGC_BUTTON
,
setfocus_ownerdraw_seq
,
killfocus_ownerdraw_seq
,
setstyle_ownerdraw_seq
,
setstate_ownerdraw_seq
,
clearstate_ownerdraw_seq
,
setcheck_ignored_seq
},
{
BS_SPLITBUTTON
,
DLGC_BUTTON
|
DLGC_UNDEFPUSHBUTTON
|
DLGC_WANTARROWS
,
setfocus_seq
,
killfocus_seq
,
setstyle_seq
,
setstate_seq
,
setstate_seq
,
setcheck_ignored_seq
},
{
BS_DEFSPLITBUTTON
,
DLGC_BUTTON
|
DLGC_DEFPUSHBUTTON
|
DLGC_WANTARROWS
,
setfocus_seq
,
killfocus_seq
,
setstyle_seq
,
setstate_seq
,
setstate_seq
,
setcheck_ignored_seq
},
{
BS_COMMANDLINK
,
DLGC_BUTTON
|
DLGC_UNDEFPUSHBUTTON
,
setfocus_seq
,
killfocus_seq
,
setstyle_seq
,
setstate_seq
,
setstate_seq
,
setcheck_ignored_seq
},
{
BS_DEFCOMMANDLINK
,
DLGC_BUTTON
|
DLGC_DEFPUSHBUTTON
,
setfocus_seq
,
killfocus_seq
,
setstyle_seq
,
setstate_seq
,
setstate_seq
,
setcheck_ignored_seq
},
};
const
struct
message
*
seq
;
unsigned
int
i
;
...
...
@@ -550,7 +562,15 @@ static void test_button_messages(void)
ok
(
style
==
button
[
i
].
style
,
"expected style %x got %x
\n
"
,
button
[
i
].
style
,
style
);
dlg_code
=
SendMessageA
(
hwnd
,
WM_GETDLGCODE
,
0
,
0
);
ok
(
dlg_code
==
button
[
i
].
dlg_code
,
"%u: wrong dlg_code %08x
\n
"
,
i
,
dlg_code
);
if
(
button
[
i
].
style
==
BS_SPLITBUTTON
||
button
[
i
].
style
==
BS_DEFSPLITBUTTON
||
button
[
i
].
style
==
BS_COMMANDLINK
||
button
[
i
].
style
==
BS_DEFCOMMANDLINK
)
{
ok
(
dlg_code
==
button
[
i
].
dlg_code
||
broken
(
dlg_code
==
DLGC_BUTTON
)
/* WinXP */
,
"%u: wrong dlg_code %08x
\n
"
,
i
,
dlg_code
);
}
else
ok
(
dlg_code
==
button
[
i
].
dlg_code
,
"%u: wrong dlg_code %08x
\n
"
,
i
,
dlg_code
);
ShowWindow
(
hwnd
,
SW_SHOW
);
UpdateWindow
(
hwnd
);
...
...
@@ -650,7 +670,11 @@ static void test_button_messages(void)
button
[
i
].
style
==
BS_DEFPUSHBUTTON
||
button
[
i
].
style
==
BS_GROUPBOX
||
button
[
i
].
style
==
BS_USERBUTTON
||
button
[
i
].
style
==
BS_OWNERDRAW
)
button
[
i
].
style
==
BS_OWNERDRAW
||
button
[
i
].
style
==
BS_SPLITBUTTON
||
button
[
i
].
style
==
BS_DEFSPLITBUTTON
||
button
[
i
].
style
==
BS_COMMANDLINK
||
button
[
i
].
style
==
BS_DEFCOMMANDLINK
)
{
ok_sequence
(
sequences
,
COMBINED_SEQ_INDEX
,
button
[
i
].
setcheck
,
"BM_SETCHECK on a button"
,
FALSE
);
state
=
SendMessageA
(
hwnd
,
BM_GETCHECK
,
0
,
0
);
...
...
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