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
31b44fb6
Commit
31b44fb6
authored
Feb 16, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Fix TB_SETEXTENDEDSTYLE to use mask passed in wParam.
parent
4db6d184
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
8 deletions
+81
-8
toolbar.c
dlls/comctl32/tests/toolbar.c
+71
-0
toolbar.c
dlls/comctl32/toolbar.c
+10
-8
No files found.
dlls/comctl32/tests/toolbar.c
View file @
31b44fb6
...
...
@@ -1840,6 +1840,76 @@ static void test_create(void)
DestroyWindow
(
hwnd
);
}
typedef
struct
{
DWORD
mask
;
DWORD
style
;
DWORD
style_set
;
}
extended_style_t
;
static
const
extended_style_t
extended_style_test
[]
=
{
{
TBSTYLE_EX_DRAWDDARROWS
|
TBSTYLE_EX_HIDECLIPPEDBUTTONS
|
TBSTYLE_EX_DOUBLEBUFFER
,
TBSTYLE_EX_DRAWDDARROWS
|
TBSTYLE_EX_HIDECLIPPEDBUTTONS
|
TBSTYLE_EX_DOUBLEBUFFER
,
TBSTYLE_EX_DRAWDDARROWS
|
TBSTYLE_EX_HIDECLIPPEDBUTTONS
|
TBSTYLE_EX_DOUBLEBUFFER
},
{
TBSTYLE_EX_MIXEDBUTTONS
,
TBSTYLE_EX_MIXEDBUTTONS
,
TBSTYLE_EX_DRAWDDARROWS
|
TBSTYLE_EX_HIDECLIPPEDBUTTONS
|
TBSTYLE_EX_DOUBLEBUFFER
|
TBSTYLE_EX_MIXEDBUTTONS
},
{
0
,
TBSTYLE_EX_MIXEDBUTTONS
,
TBSTYLE_EX_MIXEDBUTTONS
},
{
0
,
0
,
0
},
{
0
,
TBSTYLE_EX_DRAWDDARROWS
,
TBSTYLE_EX_DRAWDDARROWS
},
{
0
,
TBSTYLE_EX_HIDECLIPPEDBUTTONS
,
TBSTYLE_EX_HIDECLIPPEDBUTTONS
},
{
0
,
0
,
0
},
{
TBSTYLE_EX_HIDECLIPPEDBUTTONS
,
TBSTYLE_EX_MIXEDBUTTONS
,
0
},
{
TBSTYLE_EX_MIXEDBUTTONS
,
TBSTYLE_EX_HIDECLIPPEDBUTTONS
,
0
},
{
TBSTYLE_EX_DOUBLEBUFFER
,
TBSTYLE_EX_MIXEDBUTTONS
,
0
},
{
TBSTYLE_EX_DOUBLEBUFFER
|
TBSTYLE_EX_MIXEDBUTTONS
,
TBSTYLE_EX_MIXEDBUTTONS
,
TBSTYLE_EX_MIXEDBUTTONS
},
{
TBSTYLE_EX_DOUBLEBUFFER
|
TBSTYLE_EX_MIXEDBUTTONS
,
TBSTYLE_EX_DOUBLEBUFFER
,
TBSTYLE_EX_DOUBLEBUFFER
}
};
static
void
test_TB_GET_SET_EXTENDEDSTYLE
(
void
)
{
DWORD
style
,
oldstyle
,
oldstyle2
;
const
extended_style_t
*
ptr
;
HWND
hwnd
;
int
i
;
rebuild_toolbar
(
&
hwnd
);
SendMessageA
(
hwnd
,
TB_SETEXTENDEDSTYLE
,
TBSTYLE_EX_DOUBLEBUFFER
,
TBSTYLE_EX_MIXEDBUTTONS
);
style
=
SendMessageA
(
hwnd
,
TB_GETEXTENDEDSTYLE
,
0
,
0
);
if
(
style
==
TBSTYLE_EX_MIXEDBUTTONS
)
{
win_skip
(
"Some extended style bits are not supported
\n
"
);
DestroyWindow
(
hwnd
);
return
;
}
for
(
i
=
0
;
i
<
sizeof
(
extended_style_test
)
/
sizeof
(
extended_style_t
);
i
++
)
{
ptr
=
&
extended_style_test
[
i
];
oldstyle2
=
SendMessageA
(
hwnd
,
TB_GETEXTENDEDSTYLE
,
0
,
0
);
oldstyle
=
SendMessageA
(
hwnd
,
TB_SETEXTENDEDSTYLE
,
ptr
->
mask
,
ptr
->
style
);
ok
(
oldstyle
==
oldstyle2
,
"%d: got old style 0x%08x, expected 0x%08x
\n
"
,
i
,
oldstyle
,
oldstyle2
);
style
=
SendMessageA
(
hwnd
,
TB_GETEXTENDEDSTYLE
,
0
,
0
);
ok
(
style
==
ptr
->
style_set
,
"%d: got style 0x%08x, expected 0x%08x
\n
"
,
i
,
style
,
ptr
->
style_set
);
}
DestroyWindow
(
hwnd
);
}
START_TEST
(
toolbar
)
{
WNDCLASSA
wc
;
...
...
@@ -1881,6 +1951,7 @@ START_TEST(toolbar)
test_tooltip
();
test_get_set_style
();
test_create
();
test_TB_GET_SET_EXTENDEDSTYLE
();
PostQuitMessage
(
0
);
while
(
GetMessageA
(
&
msg
,
0
,
0
,
0
))
{
...
...
dlls/comctl32/toolbar.c
View file @
31b44fb6
...
...
@@ -4481,20 +4481,22 @@ TOOLBAR_SetDrawTextFlags (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
* (MSDN says that this parameter is reserved)
*/
static
LRESULT
TOOLBAR_SetExtendedStyle
(
TOOLBAR_INFO
*
infoPtr
,
LPARAM
lParam
)
TOOLBAR_SetExtendedStyle
(
TOOLBAR_INFO
*
infoPtr
,
DWORD
mask
,
DWORD
style
)
{
DWORD
dwOld
Style
;
DWORD
old_style
=
infoPtr
->
dwEx
Style
;
dwOldStyle
=
infoPtr
->
dwExStyle
;
infoPtr
->
dwExStyle
=
(
DWORD
)
lParam
;
TRACE
(
"mask=0x%08x, style=0x%08x
\n
"
,
mask
,
style
);
TRACE
(
"new style 0x%08x
\n
"
,
infoPtr
->
dwExStyle
);
if
(
mask
)
infoPtr
->
dwExStyle
=
(
old_style
&
~
mask
)
|
(
style
&
mask
);
else
infoPtr
->
dwExStyle
=
style
;
if
(
infoPtr
->
dwExStyle
&
~
TBSTYLE_EX_ALL
)
FIXME
(
"Unknown Toolbar Extended Style 0x%08x. Please report.
\n
"
,
(
infoPtr
->
dwExStyle
&
~
TBSTYLE_EX_ALL
));
if
((
dwOldS
tyle
^
infoPtr
->
dwExStyle
)
&
TBSTYLE_EX_MIXEDBUTTONS
)
if
((
old_s
tyle
^
infoPtr
->
dwExStyle
)
&
TBSTYLE_EX_MIXEDBUTTONS
)
TOOLBAR_CalcToolbar
(
infoPtr
);
else
TOOLBAR_LayoutToolbar
(
infoPtr
);
...
...
@@ -4502,7 +4504,7 @@ TOOLBAR_SetExtendedStyle (TOOLBAR_INFO *infoPtr, LPARAM lParam)
TOOLBAR_AutoSize
(
infoPtr
);
InvalidateRect
(
infoPtr
->
hwndSelf
,
NULL
,
TRUE
);
return
(
LRESULT
)
dwOldS
tyle
;
return
old_s
tyle
;
}
...
...
@@ -6629,7 +6631,7 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return
TOOLBAR_SetDrawTextFlags
(
infoPtr
,
wParam
,
lParam
);
case
TB_SETEXTENDEDSTYLE
:
return
TOOLBAR_SetExtendedStyle
(
infoPtr
,
lParam
);
return
TOOLBAR_SetExtendedStyle
(
infoPtr
,
wParam
,
lParam
);
case
TB_SETHOTIMAGELIST
:
return
TOOLBAR_SetHotImageList
(
infoPtr
,
wParam
,
(
HIMAGELIST
)
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