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
ca7b0c86
Commit
ca7b0c86
authored
Apr 05, 2007
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Apr 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: toolbar: In CreateToolbarEx the default bitmap size is also 16x16.
parent
3d7a6535
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
commctrl.c
dlls/comctl32/commctrl.c
+6
-5
toolbar.c
dlls/comctl32/tests/toolbar.c
+13
-1
No files found.
dlls/comctl32/commctrl.c
View file @
ca7b0c86
...
...
@@ -686,12 +686,13 @@ CreateToolbarEx (HWND hwnd, DWORD style, UINT wID, INT nBitmaps,
/* set bitmap and button size */
/*If CreateToolbarEx receives 0, windows sets default values*/
if
(
dxBitmap
<
=
0
)
if
(
dxBitmap
<
0
)
dxBitmap
=
16
;
if
(
dyBitmap
<=
0
)
dyBitmap
=
15
;
SendMessageW
(
hwndTB
,
TB_SETBITMAPSIZE
,
0
,
MAKELPARAM
((
WORD
)
dxBitmap
,
(
WORD
)
dyBitmap
));
if
(
dyBitmap
<
0
)
dyBitmap
=
16
;
if
(
dxBitmap
==
0
||
dyBitmap
==
0
)
dxBitmap
=
dyBitmap
=
16
;
SendMessageW
(
hwndTB
,
TB_SETBITMAPSIZE
,
0
,
MAKELPARAM
(
dxBitmap
,
dyBitmap
));
if
(
dxButton
<
0
)
dxButton
=
dxBitmap
;
...
...
dlls/comctl32/tests/toolbar.c
View file @
ca7b0c86
...
...
@@ -807,7 +807,7 @@ static void test_sizes(void)
SendMessageA
(
hToolbar
,
TB_SETBUTTONSIZE
,
0
,
MAKELONG
(
3
,
3
));
ok
(
SendMessageA
(
hToolbar
,
TB_GETBUTTONSIZE
,
0
,
0
)
==
MAKELONG
(
23
,
22
),
"Unexpected button size
\n
"
);
check_sizes
();
/*
except for the first size,
the default size is bitmap size + padding */
/* the default size is bitmap size + padding */
SendMessageA
(
hToolbar
,
TB_SETPADDING
,
0
,
MAKELONG
(
1
,
1
));
SendMessageA
(
hToolbar
,
TB_SETBUTTONSIZE
,
0
,
MAKELONG
(
3
,
3
));
ok
(
SendMessageA
(
hToolbar
,
TB_GETBUTTONSIZE
,
0
,
0
)
==
MAKELONG
(
17
,
17
),
"Unexpected button size
\n
"
);
...
...
@@ -922,6 +922,18 @@ static void test_createtoolbarex()
CHECK_IMAGELIST
(
16
,
16
,
8
);
compare
((
int
)
SendMessage
(
hToolbar
,
TB_GETBUTTONSIZE
,
0
,
0
),
0xe0017
,
"%x"
);
DestroyWindow
(
hToolbar
);
hToolbar
=
CreateToolbarEx
(
hMainWnd
,
WS_VISIBLE
,
1
,
16
,
GetModuleHandle
(
NULL
),
IDB_BITMAP_128x15
,
btns
,
3
,
0
,
0
,
12
,
-
1
,
sizeof
(
TBBUTTON
));
CHECK_IMAGELIST
(
16
,
12
,
16
);
compare
((
int
)
SendMessage
(
hToolbar
,
TB_GETBUTTONSIZE
,
0
,
0
),
0x160013
,
"%x"
);
DestroyWindow
(
hToolbar
);
hToolbar
=
CreateToolbarEx
(
hMainWnd
,
WS_VISIBLE
,
1
,
16
,
GetModuleHandle
(
NULL
),
IDB_BITMAP_128x15
,
btns
,
3
,
0
,
0
,
0
,
12
,
sizeof
(
TBBUTTON
));
CHECK_IMAGELIST
(
16
,
16
,
16
);
compare
((
int
)
SendMessage
(
hToolbar
,
TB_GETBUTTONSIZE
,
0
,
0
),
0x160017
,
"%x"
);
DestroyWindow
(
hToolbar
);
}
...
...
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