Re: Changing an associated icon
- From: "alanglloyd@xxxxxxx" <alanglloyd@xxxxxxx>
- Date: 4 Aug 2006 12:26:36 -0700
JamesR wrote:
<snip>
MyTIcon.Handle := LoadImage(hInstance, 'ICONNAME', IMAGE_ICON, 0, 0,
LR_DEFAULTSIZE);
- This again only saves the 32x32. Well if you're wondering if the
multipage icon has included in the resource correctly, like I mentioned
- another class works at extracting the multipage just fine, so it's a
case of trying to use something to get the multipage one extracted.
Have you seen the LoadImage API description ? The fourth & fifth
parameters (Icon size) is specified as follows ..
cxDesired
[in] Specifies the width, in pixels, of the icon or cursor. If this
parameter is zero and the fuLoad parameter is LR_DEFAULTSIZE, the
function uses the SM_CXICON or SM_CXCURSOR system metric value to set
the width. If this parameter is zero and LR_DEFAULTSIZE is not used,
the function uses the actual resource width.
cyDesired
[in] Specifies the height, in pixels, of the icon or cursor. If this
parameter is zero and the fuLoad parameter is LR_DEFAULTSIZE, the
function uses the SM_CYICON or SM_CYCURSOR system metric value to set
the height. If this parameter is zero and LR_DEFAULTSIZE is not used,
the function uses the actual resource height.
.... and the sixth parameter description is ...
fuLoad
[in] This parameter can be one or more of the following values.
Value Meaning
LR_DEFAULTCOLOR The default flag; it does nothing. All it means is "not
LR_MONOCHROME".
LR_CREATEDIBSECTION When the uType parameter specifies IMAGE_BITMAP,
causes the function to return a DIB section bitmap rather than a
compatible bitmap. This flag is useful for loading a bitmap without
mapping it to the colors of the display device.
LR_DEFAULTSIZE Uses the width or height specified by the system metric
values for cursors or icons, if the cxDesired or cyDesired values are
set to zero. If this flag is not specified and cxDesired and cyDesired
are set to zero, the function uses the actual resource size. If the
resource contains multiple images, the function uses the size of the
first image.
LR_LOADFROMFILE Loads the image from the file specified by the lpszName
parameter. If this flag is not specified, lpszName is the name of the
resource.
LR_LOADMAP3DCOLORS Searches the color table for the image and replaces
the following shades of gray with the corresponding 3-D color:
This seems to explains why you could get only the first image in the
file. You would have to get the others by specifying the size
(cxdesired & cyDesired) you want.
Alan Lloyd
.
- Follow-Ups:
- Re: Changing an associated icon
- From: JamesR
- Re: Changing an associated icon
- References:
- Changing an associated icon
- From: JamesR
- Re: Changing an associated icon
- From: Dodgy
- Re: Changing an associated icon
- From: JamesR
- Re: Changing an associated icon
- From: Maarten Wiltink
- Re: Changing an associated icon
- From: JamesR
- Re: Changing an associated icon
- From: Maarten Wiltink
- Re: Changing an associated icon
- From: JamesR
- Changing an associated icon
- Prev by Date: Re: Changing an associated icon
- Next by Date: Re: Changing an associated icon
- Previous by thread: Re: Changing an associated icon
- Next by thread: Re: Changing an associated icon
- Index(es):
Relevant Pages
|