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
c9ca25aa
Commit
c9ca25aa
authored
Mar 19, 2007
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Mar 19, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: CreateToolbarEx should send TB_SETBITMAPSIZE twice.
parent
4893b157
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
6 deletions
+47
-6
commctrl.c
dlls/comctl32/commctrl.c
+7
-6
toolbar.c
dlls/comctl32/tests/toolbar.c
+40
-0
No files found.
dlls/comctl32/commctrl.c
View file @
c9ca25aa
...
@@ -693,12 +693,13 @@ CreateToolbarEx (HWND hwnd, DWORD style, UINT wID, INT nBitmaps,
...
@@ -693,12 +693,13 @@ CreateToolbarEx (HWND hwnd, DWORD style, UINT wID, INT nBitmaps,
SendMessageW
(
hwndTB
,
TB_SETBITMAPSIZE
,
0
,
SendMessageW
(
hwndTB
,
TB_SETBITMAPSIZE
,
0
,
MAKELPARAM
((
WORD
)
dxBitmap
,
(
WORD
)
dyBitmap
));
MAKELPARAM
((
WORD
)
dxBitmap
,
(
WORD
)
dyBitmap
));
if
(
dxButton
<=
0
)
if
(
dxButton
<
0
)
dxButton
=
24
;
dxButton
=
dxBitmap
;
if
(
dyButton
<=
0
)
if
(
dyButton
<
0
)
dyButton
=
22
;
dyButton
=
dyBitmap
;
SendMessageW
(
hwndTB
,
TB_SETBUTTONSIZE
,
0
,
/* TB_SETBUTTONSIZE -> TB_SETBITMAPSIZE bug introduced for Windows compatibility */
MAKELPARAM
((
WORD
)
dxButton
,
(
WORD
)
dyButton
));
if
(
dxButton
!=
0
&&
dyButton
!=
0
)
SendMessageW
(
hwndTB
,
TB_SETBITMAPSIZE
,
0
,
MAKELPARAM
(
dxButton
,
dyButton
));
/* add bitmaps */
/* add bitmaps */
...
...
dlls/comctl32/tests/toolbar.c
View file @
c9ca25aa
...
@@ -869,6 +869,45 @@ static void test_sizes(void)
...
@@ -869,6 +869,45 @@ static void test_sizes(void)
DestroyWindow
(
hToolbar
);
DestroyWindow
(
hToolbar
);
}
}
static
void
test_createtoolbarex
()
{
HWND
hToolbar
;
TBBUTTON
btns
[
3
];
ZeroMemory
(
&
btns
,
sizeof
(
btns
));
hToolbar
=
CreateToolbarEx
(
hMainWnd
,
WS_VISIBLE
,
1
,
16
,
GetModuleHandle
(
NULL
),
IDB_BITMAP_128x15
,
btns
,
3
,
20
,
20
,
16
,
16
,
sizeof
(
TBBUTTON
));
CHECK_IMAGELIST
(
16
,
20
,
20
);
compare
((
int
)
SendMessage
(
hToolbar
,
TB_GETBUTTONSIZE
,
0
,
0
),
0x1a001b
,
"%x"
);
DestroyWindow
(
hToolbar
);
hToolbar
=
CreateToolbarEx
(
hMainWnd
,
WS_VISIBLE
,
1
,
16
,
GetModuleHandle
(
NULL
),
IDB_BITMAP_128x15
,
btns
,
3
,
4
,
4
,
16
,
16
,
sizeof
(
TBBUTTON
));
CHECK_IMAGELIST
(
32
,
4
,
4
);
compare
((
int
)
SendMessage
(
hToolbar
,
TB_GETBUTTONSIZE
,
0
,
0
),
0xa000b
,
"%x"
);
DestroyWindow
(
hToolbar
);
hToolbar
=
CreateToolbarEx
(
hMainWnd
,
WS_VISIBLE
,
1
,
16
,
GetModuleHandle
(
NULL
),
IDB_BITMAP_128x15
,
btns
,
3
,
0
,
8
,
12
,
12
,
sizeof
(
TBBUTTON
));
CHECK_IMAGELIST
(
16
,
12
,
12
);
compare
((
int
)
SendMessage
(
hToolbar
,
TB_GETBUTTONSIZE
,
0
,
0
),
0x120013
,
"%x"
);
DestroyWindow
(
hToolbar
);
hToolbar
=
CreateToolbarEx
(
hMainWnd
,
WS_VISIBLE
,
1
,
16
,
GetModuleHandle
(
NULL
),
IDB_BITMAP_128x15
,
btns
,
3
,
-
1
,
8
,
12
,
12
,
sizeof
(
TBBUTTON
));
CHECK_IMAGELIST
(
16
,
12
,
8
);
compare
((
int
)
SendMessage
(
hToolbar
,
TB_GETBUTTONSIZE
,
0
,
0
),
0xe0013
,
"%x"
);
DestroyWindow
(
hToolbar
);
hToolbar
=
CreateToolbarEx
(
hMainWnd
,
WS_VISIBLE
,
1
,
16
,
GetModuleHandle
(
NULL
),
IDB_BITMAP_128x15
,
btns
,
3
,
-
1
,
8
,
-
1
,
12
,
sizeof
(
TBBUTTON
));
CHECK_IMAGELIST
(
16
,
16
,
8
);
compare
((
int
)
SendMessage
(
hToolbar
,
TB_GETBUTTONSIZE
,
0
,
0
),
0xe0017
,
"%x"
);
DestroyWindow
(
hToolbar
);
}
START_TEST
(
toolbar
)
START_TEST
(
toolbar
)
{
{
WNDCLASSA
wc
;
WNDCLASSA
wc
;
...
@@ -899,6 +938,7 @@ START_TEST(toolbar)
...
@@ -899,6 +938,7 @@ START_TEST(toolbar)
test_add_string
();
test_add_string
();
test_hotitem
();
test_hotitem
();
test_sizes
();
test_sizes
();
test_createtoolbarex
();
PostQuitMessage
(
0
);
PostQuitMessage
(
0
);
while
(
GetMessageA
(
&
msg
,
0
,
0
,
0
))
{
while
(
GetMessageA
(
&
msg
,
0
,
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