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
f75c7b5f
Commit
f75c7b5f
authored
May 14, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Make ImageList_AddMasked call ImageList_Add instead of duplicating the functionality.
parent
4f9e09ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
29 deletions
+7
-29
imagelist.c
dlls/comctl32/imagelist.c
+7
-29
No files found.
dlls/comctl32/imagelist.c
View file @
f75c7b5f
...
...
@@ -335,12 +335,10 @@ INT WINAPI
ImageList_AddMasked
(
HIMAGELIST
himl
,
HBITMAP
hBitmap
,
COLORREF
clrMask
)
{
HDC
hdcMask
,
hdcBitmap
;
INT
i
,
nIndex
,
nImageCoun
t
;
INT
re
t
;
BITMAP
bmp
;
HBITMAP
hOldBitmap
;
HBITMAP
hMaskBitmap
=
0
;
HBITMAP
hMaskBitmap
;
COLORREF
bkColor
;
POINT
pt
;
TRACE
(
"himl=%p hbitmap=%p clrmask=%x
\n
"
,
himl
,
hBitmap
,
clrMask
);
if
(
!
is_valid
(
himl
))
...
...
@@ -349,18 +347,8 @@ ImageList_AddMasked (HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask)
if
(
!
GetObjectW
(
hBitmap
,
sizeof
(
BITMAP
),
&
bmp
))
return
-
1
;
if
(
himl
->
cx
>
0
)
nImageCount
=
bmp
.
bmWidth
/
himl
->
cx
;
else
nImageCount
=
0
;
IMAGELIST_InternalExpandBitmaps
(
himl
,
nImageCount
);
nIndex
=
himl
->
cCurImage
;
himl
->
cCurImage
+=
nImageCount
;
hdcBitmap
=
CreateCompatibleDC
(
0
);
hOldBitmap
=
SelectObject
(
hdcBitmap
,
hBitmap
);
SelectObject
(
hdcBitmap
,
hBitmap
);
/* Create a temp Mask so we can remove the background of the Image */
hdcMask
=
CreateCompatibleDC
(
0
);
...
...
@@ -389,23 +377,13 @@ ImageList_AddMasked (HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask)
*/
BitBlt
(
hdcBitmap
,
0
,
0
,
bmp
.
bmWidth
,
bmp
.
bmHeight
,
hdcMask
,
0
,
0
,
0x220326
);
/* Copy result to the imagelist */
for
(
i
=
0
;
i
<
nImageCount
;
i
++
)
{
imagelist_point_from_index
(
himl
,
nIndex
+
i
,
&
pt
);
BitBlt
(
himl
->
hdcImage
,
pt
.
x
,
pt
.
y
,
himl
->
cx
,
bmp
.
bmHeight
,
hdcBitmap
,
i
*
himl
->
cx
,
0
,
SRCCOPY
);
BitBlt
(
himl
->
hdcMask
,
pt
.
x
,
pt
.
y
,
himl
->
cx
,
bmp
.
bmHeight
,
hdcMask
,
i
*
himl
->
cx
,
0
,
SRCCOPY
);
}
/* Clean up */
SelectObject
(
hdcBitmap
,
hOldBitmap
);
DeleteDC
(
hdcBitmap
);
DeleteObject
(
hMaskBitmap
);
DeleteDC
(
hdcMask
);
return
nIndex
;
ret
=
ImageList_Add
(
himl
,
hBitmap
,
hMaskBitmap
);
DeleteObject
(
hMaskBitmap
);
return
ret
;
}
...
...
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