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
18265309
Commit
18265309
authored
Oct 14, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Use the appropriate color format when loading a DIB in ImageList_LoadImageW.
parent
a19defdf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
imagelist.c
dlls/comctl32/imagelist.c
+8
-6
No files found.
dlls/comctl32/imagelist.c
View file @
18265309
...
...
@@ -1907,8 +1907,11 @@ ImageList_LoadImageW (HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow,
}
if
(
uType
==
IMAGE_BITMAP
)
{
BITMAP
bmp
;
GetObjectW
(
handle
,
sizeof
(
BITMAP
),
&
bmp
);
DIBSECTION
dib
;
UINT
color
;
if
(
GetObjectW
(
handle
,
sizeof
(
dib
),
&
dib
)
==
sizeof
(
BITMAP
))
color
=
ILC_COLOR
;
else
color
=
dib
.
dsBm
.
bmBitsPixel
;
/* To match windows behavior, if cx is set to zero and
the flag DI_DEFAULTSIZE is specified, cx becomes the
...
...
@@ -1919,13 +1922,12 @@ ImageList_LoadImageW (HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow,
if
(
uFlags
&
DI_DEFAULTSIZE
)
cx
=
GetSystemMetrics
(
SM_CXICON
);
else
cx
=
bmp
.
bmHeight
;
cx
=
dib
.
dsBm
.
bmHeight
;
}
nImageCount
=
bmp
.
bmWidth
/
cx
;
nImageCount
=
dib
.
dsBm
.
bmWidth
/
cx
;
himl
=
ImageList_Create
(
cx
,
bmp
.
bmHeight
,
ILC_MASK
|
ILC_COLOR
,
nImageCount
,
cGrow
);
himl
=
ImageList_Create
(
cx
,
dib
.
dsBm
.
bmHeight
,
ILC_MASK
|
color
,
nImageCount
,
cGrow
);
if
(
!
himl
)
{
DeleteObject
(
handle
);
return
NULL
;
...
...
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