Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
307f39c0
Commit
307f39c0
authored
Mar 19, 2007
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Mar 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: toolbar: We shouldn't try to resize standard bitmaps.
parent
e3b7c304
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
24 deletions
+3
-24
toolbar.c
dlls/comctl32/tests/toolbar.c
+1
-23
toolbar.c
dlls/comctl32/toolbar.c
+2
-1
No files found.
dlls/comctl32/tests/toolbar.c
View file @
307f39c0
...
...
@@ -190,28 +190,6 @@ static void rebuild_toolbar_with_buttons(HWND *hToolbar)
} \
}
#define CHECK_IMAGELIST_TODO_COUNT(count, dx, dy) { \
int cx, cy; \
HIMAGELIST himl = (HIMAGELIST)SendMessageA(hToolbar, TB_GETIMAGELIST, 0, 0); \
ok(himl != NULL, "No image list\n"); \
if (himl != NULL) {\
todo_wine ok(ImageList_GetImageCount(himl) == count, "Images count mismatch - %d vs %d\n", count, ImageList_GetImageCount(himl)); \
ImageList_GetIconSize(himl, &cx, &cy); \
ok(cx == dx && cy == dy, "Icon size mismatch - %dx%d vs %dx%d\n", dx, dy, cx, cy); \
} \
}
#define CHECK_IMAGELIST_TODO_COUNT_SIZE(count, dx, dy) { \
int cx, cy; \
HIMAGELIST himl = (HIMAGELIST)SendMessageA(hToolbar, TB_GETIMAGELIST, 0, 0); \
ok(himl != NULL, "No image list\n"); \
if (himl != NULL) {\
todo_wine ok(ImageList_GetImageCount(himl) == count, "Images count mismatch - %d vs %d\n", count, ImageList_GetImageCount(himl)); \
ImageList_GetIconSize(himl, &cx, &cy); \
todo_wine ok(cx == dx && cy == dy, "Icon size mismatch - %dx%d vs %dx%d\n", dx, dy, cx, cy); \
} \
}
static
void
test_add_bitmap
(
void
)
{
HWND
hToolbar
=
NULL
;
...
...
@@ -358,7 +336,7 @@ static void test_add_bitmap(void)
ok
(
SendMessageA
(
hToolbar
,
TB_ADDBITMAP
,
0
,
(
LPARAM
)
&
stdsmall
)
==
1
,
"TB_SETBITMAPSIZE failed
\n
"
);
UpdateWindow
(
hToolbar
);
compare
((
int
)
SendMessageA
(
hToolbar
,
TB_GETBUTTONSIZE
,
0
,
0
),
MAKELONG
(
23
,
22
),
"%x"
);
CHECK_IMAGELIST
_TODO_COUNT
(
22
,
20
,
15
);
CHECK_IMAGELIST
(
22
,
20
,
15
);
/* check standard bitmaps */
addbmp
.
hInst
=
HINST_COMMCTRL
;
...
...
dlls/comctl32/toolbar.c
View file @
307f39c0
...
...
@@ -2669,7 +2669,8 @@ TOOLBAR_AddBitmapToImageList(TOOLBAR_INFO *infoPtr, HIMAGELIST himlDef, const TB
/* enlarge the bitmap if needed */
ImageList_GetIconSize
(
himlDef
,
&
cxIcon
,
&
cyIcon
);
COMCTL32_EnsureBitmapSize
(
&
hbmLoad
,
cxIcon
*
(
INT
)
bitmap
->
nButtons
,
cyIcon
,
comctl32_color
.
clrBtnFace
);
if
(
bitmap
->
hInst
!=
COMCTL32_hModule
)
COMCTL32_EnsureBitmapSize
(
&
hbmLoad
,
cxIcon
*
(
INT
)
bitmap
->
nButtons
,
cyIcon
,
comctl32_color
.
clrBtnFace
);
nIndex
=
ImageList_AddMasked
(
himlDef
,
hbmLoad
,
comctl32_color
.
clrBtnFace
);
DeleteObject
(
hbmLoad
);
...
...
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