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
9e390091
Commit
9e390091
authored
Sep 20, 2006
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Sep 21, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: toolbar: Fix IDB_STD_VIEW_* icons count (with testcase).
parent
d457b37d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletion
+32
-1
toolbar.c
dlls/comctl32/tests/toolbar.c
+31
-0
toolbar.c
dlls/comctl32/toolbar.c
+1
-1
No files found.
dlls/comctl32/tests/toolbar.c
View file @
9e390091
...
...
@@ -149,6 +149,7 @@ static void test_add_bitmap(void)
TBADDBITMAP
bmp128
;
TBADDBITMAP
bmp80
;
TBADDBITMAP
stdsmall
;
TBADDBITMAP
addbmp
;
INT
ret
;
/* empty 128x15 bitmap */
...
...
@@ -240,6 +241,36 @@ static void test_add_bitmap(void)
UpdateWindow
(
hToolbar
);
CHECK_IMAGELIST_TODO_COUNT_SIZE
(
28
,
16
,
15
);
/* check standard bitmaps */
addbmp
.
hInst
=
HINST_COMMCTRL
;
addbmp
.
nID
=
IDB_STD_SMALL_COLOR
;
rebuild_toolbar
(
&
hToolbar
);
ok
(
SendMessageA
(
hToolbar
,
TB_ADDBITMAP
,
1
,
(
LPARAM
)
&
addbmp
)
==
0
,
"TB_ADDBITMAP - unexpected return
\n
"
);
CHECK_IMAGELIST
(
15
,
16
,
15
);
addbmp
.
nID
=
IDB_STD_LARGE_COLOR
;
rebuild_toolbar
(
&
hToolbar
);
ok
(
SendMessageA
(
hToolbar
,
TB_ADDBITMAP
,
1
,
(
LPARAM
)
&
addbmp
)
==
0
,
"TB_ADDBITMAP - unexpected return
\n
"
);
CHECK_IMAGELIST
(
15
,
24
,
24
);
addbmp
.
nID
=
IDB_VIEW_SMALL_COLOR
;
rebuild_toolbar
(
&
hToolbar
);
ok
(
SendMessageA
(
hToolbar
,
TB_ADDBITMAP
,
1
,
(
LPARAM
)
&
addbmp
)
==
0
,
"TB_ADDBITMAP - unexpected return
\n
"
);
CHECK_IMAGELIST
(
12
,
16
,
15
);
addbmp
.
nID
=
IDB_VIEW_LARGE_COLOR
;
rebuild_toolbar
(
&
hToolbar
);
ok
(
SendMessageA
(
hToolbar
,
TB_ADDBITMAP
,
1
,
(
LPARAM
)
&
addbmp
)
==
0
,
"TB_ADDBITMAP - unexpected return
\n
"
);
CHECK_IMAGELIST
(
12
,
24
,
24
);
addbmp
.
nID
=
IDB_HIST_SMALL_COLOR
;
rebuild_toolbar
(
&
hToolbar
);
ok
(
SendMessageA
(
hToolbar
,
TB_ADDBITMAP
,
1
,
(
LPARAM
)
&
addbmp
)
==
0
,
"TB_ADDBITMAP - unexpected return
\n
"
);
CHECK_IMAGELIST
(
5
,
16
,
15
);
addbmp
.
nID
=
IDB_HIST_LARGE_COLOR
;
rebuild_toolbar
(
&
hToolbar
);
ok
(
SendMessageA
(
hToolbar
,
TB_ADDBITMAP
,
1
,
(
LPARAM
)
&
addbmp
)
==
0
,
"TB_ADDBITMAP - unexpected return
\n
"
);
CHECK_IMAGELIST
(
5
,
24
,
24
);
DestroyWindow
(
hToolbar
);
}
...
...
dlls/comctl32/toolbar.c
View file @
9e390091
...
...
@@ -2591,7 +2591,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
if
((
lpAddBmp
->
nID
&
~
1
)
==
IDB_STD_SMALL_COLOR
)
nButtons
=
15
;
else
if
((
lpAddBmp
->
nID
&
~
1
)
==
IDB_VIEW_SMALL_COLOR
)
nButtons
=
1
3
;
nButtons
=
1
2
;
else
if
((
lpAddBmp
->
nID
&
~
1
)
==
IDB_HIST_SMALL_COLOR
)
nButtons
=
5
;
else
...
...
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