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
496d6347
Commit
496d6347
authored
Aug 17, 2006
by
Oleg Krylov
Committed by
Alexandre Julliard
Aug 18, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Fix ImageList_Replace function to correctly apply image mask.
parent
5ffb0174
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
imagelist.c
dlls/comctl32/imagelist.c
+15
-9
No files found.
dlls/comctl32/imagelist.c
View file @
496d6347
...
...
@@ -2158,6 +2158,7 @@ ImageList_Replace (HIMAGELIST himl, INT i, HBITMAP hbmImage,
{
HDC
hdcImage
;
BITMAP
bmp
;
HBITMAP
hOldBitmap
;
TRACE
(
"%p %d %p %p
\n
"
,
himl
,
i
,
hbmImage
,
hbmMask
);
...
...
@@ -2175,29 +2176,34 @@ ImageList_Replace (HIMAGELIST himl, INT i, HBITMAP hbmImage,
GetObjectA
(
hbmImage
,
sizeof
(
BITMAP
),
(
LPVOID
)
&
bmp
);
/* Replace Image */
SelectObject
(
hdcImage
,
hbmImage
);
hOldBitmap
=
SelectObject
(
hdcImage
,
hbmImage
);
StretchBlt
(
himl
->
hdcImage
,
i
*
himl
->
cx
,
0
,
himl
->
cx
,
himl
->
cy
,
hdcImage
,
0
,
0
,
bmp
.
bmWidth
,
bmp
.
bmHeight
,
SRCCOPY
);
if
(
himl
->
hbmMask
)
{
/* Replace Mask */
SelectObject
(
hdcImage
,
hbmMask
)
;
HDC
hdcTemp
;
HBITMAP
hOldBitmapTemp
;
StretchBlt
(
himl
->
hdcMask
,
i
*
himl
->
cx
,
0
,
himl
->
cx
,
himl
->
cy
,
hdcImage
,
0
,
0
,
bmp
.
bmWidth
,
bmp
.
bmHeight
,
SRCCOPY
);
hdcTemp
=
CreateCompatibleDC
(
0
);
hOldBitmapTemp
=
SelectObject
(
hdcTemp
,
hbmMask
);
StretchBlt
(
himl
->
hdcMask
,
i
*
himl
->
cx
,
0
,
himl
->
cx
,
himl
->
cy
,
hdcTemp
,
0
,
0
,
bmp
.
bmWidth
,
bmp
.
bmHeight
,
SRCCOPY
);
SelectObject
(
hdcTemp
,
hOldBitmapTemp
);
DeleteDC
(
hdcTemp
);
/* Remove the background from the image
*/
Stretch
Blt
(
himl
->
hdcImage
,
i
*
himl
->
cx
,
0
,
himl
->
cx
,
himl
->
cy
,
h
dcImage
,
0
,
0
,
bmp
.
bmWidth
,
bmp
.
bmHeight
,
Bit
Blt
(
himl
->
hdcImage
,
i
*
himl
->
cx
,
0
,
bmp
.
bmWidth
,
bmp
.
bmHeight
,
h
iml
->
hdcMask
,
i
*
himl
->
cx
,
0
,
0x220326
);
/* NOTSRCAND */
}
SelectObject
(
hdcImage
,
hOldBitmap
);
DeleteDC
(
hdcImage
);
return
TRUE
;
...
...
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