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
d81ddde2
Commit
d81ddde2
authored
Jun 01, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/imagelist: Don't select the mask bitmap into a DC, it may already be selected.
parent
3f6f036b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
imagelist.c
dlls/comctl32/imagelist.c
+3
-9
No files found.
dlls/comctl32/imagelist.c
View file @
d81ddde2
...
...
@@ -143,7 +143,6 @@ static BOOL add_with_alpha( HIMAGELIST himl, HDC hdc, int pos, int count,
int
width
,
int
height
,
HBITMAP
hbmImage
,
HBITMAP
hbmMask
)
{
BOOL
ret
=
FALSE
;
HDC
hdcMask
=
0
;
BITMAP
bm
;
BITMAPINFO
*
info
,
*
mask_info
=
NULL
;
DWORD
*
bits
=
NULL
;
...
...
@@ -184,8 +183,6 @@ static BOOL add_with_alpha( HIMAGELIST himl, HDC hdc, int pos, int count,
mask_info
->
bmiHeader
.
biSizeImage
=
mask_width
*
height
;
if
(
!
(
mask_bits
=
HeapAlloc
(
GetProcessHeap
(),
0
,
info
->
bmiHeader
.
biSizeImage
)))
goto
done
;
if
(
!
GetDIBits
(
hdc
,
hbmMask
,
0
,
height
,
mask_bits
,
mask_info
,
DIB_RGB_COLORS
))
goto
done
;
hdcMask
=
CreateCompatibleDC
(
0
);
SelectObject
(
hdcMask
,
hbmMask
);
}
for
(
n
=
0
;
n
<
count
;
n
++
)
...
...
@@ -207,8 +204,6 @@ static BOOL add_with_alpha( HIMAGELIST himl, HDC hdc, int pos, int count,
bits
[
i
*
bm
.
bmWidth
+
j
]
|=
0xff000000
;
else
bits
[
i
*
bm
.
bmWidth
+
j
]
=
0
;
if
(
hdcMask
)
StretchBlt
(
himl
->
hdcMask
,
pt
.
x
,
pt
.
y
,
himl
->
cx
,
himl
->
cy
,
hdcMask
,
n
*
width
,
0
,
width
,
height
,
SRCCOPY
);
}
else
{
...
...
@@ -222,18 +217,17 @@ static BOOL add_with_alpha( HIMAGELIST himl, HDC hdc, int pos, int count,
mask_bits
[
i
*
mask_width
+
j
/
8
]
&=
~
(
0x80
>>
(
j
%
8
));
else
mask_bits
[
i
*
mask_width
+
j
/
8
]
|=
0x80
>>
(
j
%
8
);
StretchDIBits
(
himl
->
hdcMask
,
pt
.
x
,
pt
.
y
,
himl
->
cx
,
himl
->
cy
,
n
*
width
,
0
,
width
,
height
,
mask_bits
,
mask_info
,
DIB_RGB_COLORS
,
SRCCOPY
);
}
}
StretchDIBits
(
himl
->
hdcImage
,
pt
.
x
,
pt
.
y
,
himl
->
cx
,
himl
->
cy
,
n
*
width
,
0
,
width
,
height
,
bits
,
info
,
DIB_RGB_COLORS
,
SRCCOPY
);
if
(
mask_info
)
StretchDIBits
(
himl
->
hdcMask
,
pt
.
x
,
pt
.
y
,
himl
->
cx
,
himl
->
cy
,
n
*
width
,
0
,
width
,
height
,
mask_bits
,
mask_info
,
DIB_RGB_COLORS
,
SRCCOPY
);
}
ret
=
TRUE
;
done:
if
(
hdcMask
)
DeleteDC
(
hdcMask
);
HeapFree
(
GetProcessHeap
(),
0
,
info
);
HeapFree
(
GetProcessHeap
(),
0
,
mask_info
);
HeapFree
(
GetProcessHeap
(),
0
,
bits
);
...
...
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