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
4d1e49dc
Commit
4d1e49dc
authored
Sep 04, 2002
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Sep 04, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fix ImageList_GetIcon to use ImageList_* functions for
completeness. - Tiny code cleanups. - Documentation updates.
parent
e4ddd2ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
27 deletions
+13
-27
imagelist.c
dlls/comctl32/imagelist.c
+13
-27
No files found.
dlls/comctl32/imagelist.c
View file @
4d1e49dc
...
...
@@ -22,13 +22,14 @@
*
* TODO:
* - Fix ImageList_DrawIndirect (rgbFg, rgbBk, dwRop).
* - Fix ImageList_GetIcon.
* - Fix ImageList_SetFilter (undocumented).
* BTW does anybody know anything about this function???
* - It removes 12 Bytes from the stack (3 Parameters).
* - First parameter SHOULD be a HIMAGELIST.
* - Second parameter COULD be an index?????
* - Third parameter.... ?????????????????????
* - Add support for ILD_PRESERVEALPHA, ILD_SCALE, ILD_DPISCALE
* - Add support for ILS_GLOW, ILS_SHADOW, ILS_SATURATE, ILS_ALPHA
*
* Comments:
* - ImageList_Draw, ImageList_DrawEx and ImageList_GetIcon use
...
...
@@ -1526,10 +1527,7 @@ ImageList_EndDrag (void)
COLORREF
WINAPI
ImageList_GetBkColor
(
HIMAGELIST
himl
)
{
if
(
himl
==
NULL
)
return
CLR_NONE
;
return
himl
->
clrBk
;
return
himl
?
himl
->
clrBk
:
CLR_NONE
;
}
...
...
@@ -1600,50 +1598,38 @@ HICON WINAPI
ImageList_GetIcon
(
HIMAGELIST
himl
,
INT
i
,
UINT
fStyle
)
{
ICONINFO
ii
;
HICON
hIcon
;
HBITMAP
hOld
SrcBitmap
,
hOld
DstBitmap
;
HDC
hdcSrc
,
hdcDst
;
HICON
hIcon
;
HBITMAP
hOldDstBitmap
;
HDC
hdcDst
;
if
((
himl
==
NULL
)
||
(
i
<
0
)
||
(
i
>=
himl
->
cCurImage
))
{
return
0
;
}
if
((
himl
==
NULL
)
||
(
i
<
0
)
||
(
i
>=
himl
->
cCurImage
))
return
0
;
hdcSrc
=
CreateCompatibleDC
(
0
);
hdcDst
=
CreateCompatibleDC
(
0
);
ii
.
fIcon
=
TRUE
;
ii
.
hbmMask
=
CreateCompatibleBitmap
(
hdcDst
,
himl
->
cx
,
himl
->
cy
);
/* draw mask*/
ii
.
hbmMask
=
CreateCompatibleBitmap
(
hdcDst
,
himl
->
cx
,
himl
->
cy
);
hOldDstBitmap
=
(
HBITMAP
)
SelectObject
(
hdcDst
,
ii
.
hbmMask
);
if
(
himl
->
hbmMask
)
{
SelectObject
(
hdcSrc
,
himl
->
hbmMask
);
BitBlt
(
hdcDst
,
0
,
0
,
himl
->
cx
,
himl
->
cy
,
hdcSrc
,
i
*
himl
->
cx
,
0
,
SRCCOPY
);
}
else
PatBlt
(
hdcDst
,
0
,
0
,
himl
->
cx
,
himl
->
cy
,
BLACKNESS
);
ImageList_Draw
(
himl
,
i
,
hdcDst
,
0
,
0
,
ILD_MASK
);
/* draw image*/
hOldSrcBitmap
=
(
HBITMAP
)
SelectObject
(
hdcSrc
,
himl
->
hbmImage
);
ii
.
hbmColor
=
CreateCompatibleBitmap
(
hdc
Src
,
himl
->
cx
,
himl
->
cy
);
SelectObject
(
hdcDst
,
himl
->
hbmImage
);
ii
.
hbmColor
=
CreateCompatibleBitmap
(
hdc
Dst
,
himl
->
cx
,
himl
->
cy
);
SelectObject
(
hdcDst
,
ii
.
hbmColor
);
BitBlt
(
hdcDst
,
0
,
0
,
himl
->
cx
,
himl
->
cy
,
hdcSrc
,
i
*
himl
->
cx
,
0
,
SRCCOPY
);
ImageList_Draw
(
himl
,
i
,
hdcDst
,
0
,
0
,
fStyle
);
/*
* CreateIconIndirect requires us to deselect the bitmaps from
* the DCs before calling
*/
SelectObject
(
hdcSrc
,
hOldSrcBitmap
);
SelectObject
(
hdcDst
,
hOldDstBitmap
);
hIcon
=
CreateIconIndirect
(
&
ii
);
DeleteDC
(
hdcSrc
);
DeleteDC
(
hdcDst
);
DeleteObject
(
ii
.
hbmMask
);
DeleteObject
(
ii
.
hbmColor
);
DeleteDC
(
hdcDst
);
return
hIcon
;
}
...
...
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