Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
9e390091
Commit
9e390091
authored
18 years ago
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
18 years ago
Browse files
Options
Downloads
Patches
Plain Diff
comctl32: toolbar: Fix IDB_STD_VIEW_* icons count (with testcase).
parent
d457b37d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/comctl32/tests/toolbar.c
+31
-0
31 additions, 0 deletions
dlls/comctl32/tests/toolbar.c
dlls/comctl32/toolbar.c
+1
-1
1 addition, 1 deletion
dlls/comctl32/toolbar.c
with
32 additions
and
1 deletion
dlls/comctl32/tests/toolbar.c
+
31
−
0
View file @
9e390091
...
@@ -149,6 +149,7 @@ static void test_add_bitmap(void)
...
@@ -149,6 +149,7 @@ static void test_add_bitmap(void)
TBADDBITMAP
bmp128
;
TBADDBITMAP
bmp128
;
TBADDBITMAP
bmp80
;
TBADDBITMAP
bmp80
;
TBADDBITMAP
stdsmall
;
TBADDBITMAP
stdsmall
;
TBADDBITMAP
addbmp
;
INT
ret
;
INT
ret
;
/* empty 128x15 bitmap */
/* empty 128x15 bitmap */
...
@@ -240,6 +241,36 @@ static void test_add_bitmap(void)
...
@@ -240,6 +241,36 @@ static void test_add_bitmap(void)
UpdateWindow
(
hToolbar
);
UpdateWindow
(
hToolbar
);
CHECK_IMAGELIST_TODO_COUNT_SIZE
(
28
,
16
,
15
);
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
);
DestroyWindow
(
hToolbar
);
}
}
...
...
This diff is collapsed.
Click to expand it.
dlls/comctl32/toolbar.c
+
1
−
1
View file @
9e390091
...
@@ -2591,7 +2591,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -2591,7 +2591,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
if
((
lpAddBmp
->
nID
&
~
1
)
==
IDB_STD_SMALL_COLOR
)
if
((
lpAddBmp
->
nID
&
~
1
)
==
IDB_STD_SMALL_COLOR
)
nButtons
=
15
;
nButtons
=
15
;
else
if
((
lpAddBmp
->
nID
&
~
1
)
==
IDB_VIEW_SMALL_COLOR
)
else
if
((
lpAddBmp
->
nID
&
~
1
)
==
IDB_VIEW_SMALL_COLOR
)
nButtons
=
1
3
;
nButtons
=
1
2
;
else
if
((
lpAddBmp
->
nID
&
~
1
)
==
IDB_HIST_SMALL_COLOR
)
else
if
((
lpAddBmp
->
nID
&
~
1
)
==
IDB_HIST_SMALL_COLOR
)
nButtons
=
5
;
nButtons
=
5
;
else
else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment