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
a4c9d96a
Commit
a4c9d96a
authored
Nov 14, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Fixed handling of monochrome icons in image lists.
parent
e3b56108
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
11 deletions
+23
-11
imagelist.c
dlls/comctl32/imagelist.c
+23
-11
No files found.
dlls/comctl32/imagelist.c
View file @
a4c9d96a
...
...
@@ -2291,8 +2291,6 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT nIndex, HICON hIcon)
return
-
1
;
}
if
(
ii
.
hbmColor
==
0
)
ERR
(
"no color!
\n
"
);
ret
=
GetObjectW
(
ii
.
hbmMask
,
sizeof
(
BITMAP
),
(
LPVOID
)
&
bmp
);
if
(
!
ret
)
{
ERR
(
"couldn't get mask bitmap info
\n
"
);
...
...
@@ -2317,18 +2315,32 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT nIndex, HICON hIcon)
if
(
hdcImage
==
0
)
ERR
(
"invalid hdcImage!
\n
"
);
imagelist_point_from_index
(
himl
,
nIndex
,
&
pt
);
SetTextColor
(
himl
->
hdcImage
,
RGB
(
0
,
0
,
0
));
SetBkColor
(
himl
->
hdcImage
,
RGB
(
255
,
255
,
255
));
hbmOldSrc
=
SelectObject
(
hdcImage
,
ii
.
hbmColor
);
imagelist_point_from_index
(
himl
,
nIndex
,
&
pt
);
StretchBlt
(
himl
->
hdcImage
,
pt
.
x
,
pt
.
y
,
himl
->
cx
,
himl
->
cy
,
hdcImage
,
0
,
0
,
bmp
.
bmWidth
,
bmp
.
bmHeight
,
SRCCOPY
);
if
(
himl
->
hbmMask
)
{
SelectObject
(
hdcImage
,
ii
.
hbmMask
);
StretchBlt
(
himl
->
hdcMask
,
pt
.
x
,
pt
.
y
,
himl
->
cx
,
himl
->
cy
,
hdcImage
,
0
,
0
,
bmp
.
bmWidth
,
bmp
.
bmHeight
,
SRCCOPY
);
if
(
ii
.
hbmColor
)
{
hbmOldSrc
=
SelectObject
(
hdcImage
,
ii
.
hbmColor
);
StretchBlt
(
himl
->
hdcImage
,
pt
.
x
,
pt
.
y
,
himl
->
cx
,
himl
->
cy
,
hdcImage
,
0
,
0
,
bmp
.
bmWidth
,
bmp
.
bmHeight
,
SRCCOPY
);
if
(
himl
->
hbmMask
)
{
SelectObject
(
hdcImage
,
ii
.
hbmMask
);
StretchBlt
(
himl
->
hdcMask
,
pt
.
x
,
pt
.
y
,
himl
->
cx
,
himl
->
cy
,
hdcImage
,
0
,
0
,
bmp
.
bmWidth
,
bmp
.
bmHeight
,
SRCCOPY
);
}
}
else
{
UINT
height
=
bmp
.
bmHeight
/
2
;
hbmOldSrc
=
SelectObject
(
hdcImage
,
ii
.
hbmMask
);
StretchBlt
(
himl
->
hdcImage
,
pt
.
x
,
pt
.
y
,
himl
->
cx
,
himl
->
cy
,
hdcImage
,
0
,
height
,
bmp
.
bmWidth
,
height
,
SRCCOPY
);
if
(
himl
->
hbmMask
)
StretchBlt
(
himl
->
hdcMask
,
pt
.
x
,
pt
.
y
,
himl
->
cx
,
himl
->
cy
,
hdcImage
,
0
,
0
,
bmp
.
bmWidth
,
height
,
SRCCOPY
);
}
SelectObject
(
hdcImage
,
hbmOldSrc
);
...
...
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