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
6a9209da
Commit
6a9209da
authored
Nov 05, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Nov 06, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Fix Nx1 assumptions when adding multiple bitmaps with ImageList_Add.
parent
ba73cac9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
23 deletions
+17
-23
imagelist.c
dlls/comctl32/imagelist.c
+17
-23
No files found.
dlls/comctl32/imagelist.c
View file @
6a9209da
...
...
@@ -202,10 +202,10 @@ IMAGELIST_InternalExpandBitmaps (HIMAGELIST himl, INT nImageCount, INT cx, INT c
INT
WINAPI
ImageList_Add
(
HIMAGELIST
himl
,
HBITMAP
hbmImage
,
HBITMAP
hbmMask
)
{
HDC
hdcBitmap
;
INT
nFirstIndex
,
nImageCount
;
HDC
hdcBitmap
,
hdcTemp
;
INT
nFirstIndex
,
nImageCount
,
i
;
BITMAP
bmp
;
HBITMAP
hOldBitmap
;
HBITMAP
hOldBitmap
,
hOldBitmapTemp
;
POINT
pt
;
TRACE
(
"himl=%p hbmimage=%p hbmmask=%p
\n
"
,
himl
,
hbmImage
,
hbmMask
);
...
...
@@ -217,41 +217,35 @@ ImageList_Add (HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask)
IMAGELIST_InternalExpandBitmaps
(
himl
,
nImageCount
,
bmp
.
bmWidth
,
bmp
.
bmHeight
);
imagelist_point_from_index
(
himl
,
himl
->
cCurImage
,
&
pt
);
hdcBitmap
=
CreateCompatibleDC
(
0
);
hOldBitmap
=
SelectObject
(
hdcBitmap
,
hbmImage
);
/* Copy result to the imagelist
*/
BitBlt
(
himl
->
hdcImage
,
pt
.
x
,
pt
.
y
,
bmp
.
bmWidth
,
bmp
.
bmHeight
,
hdcBitmap
,
0
,
0
,
SRCCOPY
);
if
(
himl
->
hbmMask
)
for
(
i
=
0
;
i
<
nImageCount
;
i
++
)
{
HDC
hdcTemp
;
HBITMAP
hOldBitmapTemp
;
imagelist_point_from_index
(
himl
,
himl
->
cCurImage
+
i
,
&
pt
);
/* Copy result to the imagelist
*/
BitBlt
(
himl
->
hdcImage
,
pt
.
x
,
pt
.
y
,
himl
->
cx
,
bmp
.
bmHeight
,
hdcBitmap
,
i
*
himl
->
cx
,
0
,
SRCCOPY
);
if
(
!
himl
->
hbmMask
)
continue
;
hdcTemp
=
CreateCompatibleDC
(
0
);
hOldBitmapTemp
=
SelectObject
(
hdcTemp
,
hbmMask
);
BitBlt
(
himl
->
hdcMask
,
pt
.
x
,
pt
.
y
,
bmp
.
bmWidth
,
bmp
.
bmHeight
,
hdcTemp
,
0
,
0
,
SRCCOPY
);
BitBlt
(
himl
->
hdcMask
,
pt
.
x
,
pt
.
y
,
himl
->
cx
,
bmp
.
bmHeight
,
hdcTemp
,
i
*
himl
->
cx
,
0
,
SRCCOPY
);
SelectObject
(
hdcTemp
,
hOldBitmapTemp
);
DeleteDC
(
hdcTemp
);
/* Remove the background from the image
*/
BitBlt
(
himl
->
hdcImage
,
pt
.
x
,
pt
.
y
,
bmp
.
bmWidth
,
bmp
.
bmHeight
,
himl
->
hdcMask
,
pt
.
x
,
pt
.
y
,
0x220326
);
/* NOTSRCAND */
BitBlt
(
himl
->
hdcImage
,
pt
.
x
,
pt
.
y
,
himl
->
cx
,
bmp
.
bmHeight
,
himl
->
hdcMask
,
pt
.
x
,
pt
.
y
,
0x220326
);
/* NOTSRCAND */
}
SelectObject
(
hdcBitmap
,
hOldBitmap
);
...
...
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