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
292cb4d2
Commit
292cb4d2
authored
Jan 16, 2007
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Jan 16, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: toolbar: Fix the TB_SETBITMAPSIZE for width or height zero (with testcase).
parent
6cc4510b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
toolbar.c
dlls/comctl32/tests/toolbar.c
+10
-0
toolbar.c
dlls/comctl32/toolbar.c
+5
-2
No files found.
dlls/comctl32/tests/toolbar.c
View file @
292cb4d2
...
...
@@ -330,6 +330,16 @@ static void test_add_bitmap(void)
ok
(
SendMessageA
(
hToolbar
,
TB_SETBITMAPSIZE
,
0
,
MAKELONG
(
30
,
30
))
==
TRUE
,
"TB_SETBITMAPSIZE failed
\n
"
);
UpdateWindow
(
hToolbar
);
CHECK_IMAGELIST
(
8
,
30
,
30
);
/* when the width or height is zero, set it to 1 */
ok
(
SendMessageA
(
hToolbar
,
TB_SETBITMAPSIZE
,
0
,
MAKELONG
(
0
,
0
))
==
TRUE
,
"TB_SETBITMAPSIZE failed
\n
"
);
UpdateWindow
(
hToolbar
);
CHECK_IMAGELIST
(
208
,
1
,
1
);
ok
(
SendMessageA
(
hToolbar
,
TB_SETBITMAPSIZE
,
0
,
MAKELONG
(
0
,
5
))
==
TRUE
,
"TB_SETBITMAPSIZE failed
\n
"
);
UpdateWindow
(
hToolbar
);
CHECK_IMAGELIST
(
208
,
1
,
5
);
ok
(
SendMessageA
(
hToolbar
,
TB_SETBITMAPSIZE
,
0
,
MAKELONG
(
5
,
0
))
==
TRUE
,
"TB_SETBITMAPSIZE failed
\n
"
);
UpdateWindow
(
hToolbar
);
CHECK_IMAGELIST
(
41
,
5
,
1
);
/* the control can add bitmaps to an existing image list */
rebuild_toolbar
(
&
hToolbar
);
...
...
dlls/comctl32/toolbar.c
View file @
292cb4d2
...
...
@@ -4489,8 +4489,11 @@ TOOLBAR_SetBitmapSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
if
(
wParam
!=
0
)
FIXME
(
"wParam is %d. Perhaps image list index?
\n
"
,
wParam
);
if
((
LOWORD
(
lParam
)
<=
0
)
||
(
HIWORD
(
lParam
)
<=
0
))
lParam
=
MAKELPARAM
(
16
,
15
);
if
(
LOWORD
(
lParam
)
==
0
)
lParam
=
MAKELPARAM
(
1
,
HIWORD
(
lParam
));
if
(
HIWORD
(
lParam
)
==
0
)
lParam
=
MAKELPARAM
(
LOWORD
(
lParam
),
1
);
if
(
infoPtr
->
nNumButtons
>
0
)
WARN
(
"%d buttons, undoc increase to bitmap size : %d-%d -> %d-%d
\n
"
,
...
...
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