ImageList_DrawEx / ImageList_DrawIndirect

ImageList_DrawEx / ImageList_DrawIndirect

Post by Carle » Tue, 14 Dec 2004 20:26:02


Hi,

I've been trying, without success, 'blending' alpha-icons with custom
fore color ([rgbFg])... Yes, trying this on XP and with manifest file, etc,
etc. Alpha is correctly rendered in other cases, but what I get with
ILD_BLEN25 or ILD_BLEND50 styles, is simple a semitransparent icon (25% or
50%, blended with background). Same results with ImageList_DrawIndirect.
And strange thing, this effect seems working "OK" in IDE (well, without
taking in account that alpha is not rendered correctly, and that this effect
is got through a pattern brush). I don't think this has nothing to do with
alpha-icons, because, when no custom rgbFg color is specified, and style is
set to ILD_BLEN25 or ILD_BLEND50, effect is applied correctly using default
system highlight color.

Any ideas? Is this a bug, or a "limitation"?

Thanks.
 
 
 

ImageList_DrawEx / ImageList_DrawIndirect

Post by Randy Birc » Wed, 15 Dec 2004 11:41:53

This might be by design. Under the Using Image Lists section in the msdn it
states:

The ILD_BLEND25 and ILD_BLEND50 styles dither the image with the system
highlight color. These styles are useful if you use a masked image to
represent an object that the user can select. For example, you can use the
ILD_BLEND50 style to draw the image when the user selects it.

ILD_BLEND and ILD_BLEND50 are the same thing, BTW.


--


Randy Birch
MS MVP Visual Basic
http://www.yqcomputer.com/




: Hi,
:
: I've been trying, without success, 'blending' alpha-icons with custom
: fore color ([rgbFg])... Yes, trying this on XP and with manifest file,
etc,
: etc. Alpha is correctly rendered in other cases, but what I get with
: ILD_BLEN25 or ILD_BLEND50 styles, is simple a semitransparent icon (25% or
: 50%, blended with background). Same results with ImageList_DrawIndirect.
: And strange thing, this effect seems working "OK" in IDE (well, without
: taking in account that alpha is not rendered correctly, and that this
effect
: is got through a pattern brush). I don't think this has nothing to do with
: alpha-icons, because, when no custom rgbFg color is specified, and style
is
: set to ILD_BLEN25 or ILD_BLEND50, effect is applied correctly using
default
: system highlight color.
:
: Any ideas? Is this a bug, or a "limitation"?
:
: Thanks.
:
:
:
:

 
 
 

ImageList_DrawEx / ImageList_DrawIndirect

Post by Carle » Wed, 15 Dec 2004 21:45:25

Yes, that is. But I wanted to allow custom 'dither' color for selected/cut
items, as well as use ImageList_DrawIndirect for 'greyscalying'
(ILS_SATURATE state) effect in case comctl32 supports it (for disabled
items, instate of DrawState)...

Anyway: what's supposed the [rgbFg] parameter is ?

Carles.

"Randy Birch" < XXXX@XXXXX.COM > escribien el mensaje
>> This might be by design. Under the Using Image Lists section in the msdn >> it >> states: >> >> The ILD_BLEND25 and ILD_BLEND50 styles dither the image with the system >> highlight color. These styles are useful if you use a masked image to >> represent an object that the user can select. For example, you can use the >> ILD_BLEND50 style to draw the image when the user selects it. >> >> ILD_BLEND and ILD_BLEND50 are the same thing, BTW. >> >> >> -- >> >> >> Randy Birch >> MS MVP Visual Basic >> http://www.yqcomputer.com/ >> >>

>> : Hi, >> : >> : I've been trying, without success, 'blending' alpha-icons with custom >> : fore color ([rgbFg])... Yes, trying this on XP and with manifest file, >> etc, >> : etc. Alpha is correctly rendered in other cases, but what I get with >> : ILD_BLEN25 or ILD_BLEND50 styles, is simple a semitransparent icon (25% >> or >> : 50%, blended with background). Same results with ImageList_DrawIndirect. >> : And strange thing, this effect seems working "OK" in IDE (well, >> without >> : taking in account that alpha is not rendered correctly, and that this >> effect >> : is got through a pattern brush). I don't think this has nothing to do >> with >> : alpha-icons, because, when no custom rgbFg color is specified, and style >> is >> : set to ILD_BLEN25 or ILD_BLEND50, effect is applied correctly using >> default >> : system highlight color. >> : >> : Any ideas? Is this a bug, or a "limitation"? >> : >> : Thanks. >> : >> : >> : >> : >>
 
 
 

ImageList_DrawEx / ImageList_DrawIndirect

Post by Carle » Wed, 15 Dec 2004 22:25:48

his is a multi-part message in MIME format.


Thanks Mike, I've already seen this. This is the reason I've posted this...

And problem comes with rgbFg:

rgbFg
Image foreground color. This member is used only if fStyle includes the ILD_BLEND OR ILD_BLEND50 flag. This parameter can be an application-defined RGB value or one of the following values:
CLR_DEFAULT
Default foreground color. The image is drawn using the system highlight color as the foreground color.
CLR_NONE
No blend color. The image is blended with the color of the destination device context.

So, three cases. What I'm trying to do is use a custom *blend-color* (application-defined RGB value).
And what I'm getting is not what is supposed to be. It's seems that result is same that specifying CLR_NONE: resulting rendered icon (alpha-icon) is simply blended with background with 'transparency' 25% or 50%.

Carles



"Mike D Sutton" < XXXX@XXXXX.COM > escribien el mensaje news: XXXX@XXXXX.COM ... >>> Yes, that is. But I wanted to allow custom 'dither' color for selected/cut >>> items, as well as use ImageList_DrawIndirect for 'greyscalying' >>> (ILS_SATURATE state) effect in case comctl32 supports it (for disabled >>> items, instate of DrawState)... >>> >>> Anyway: what's supposed the [rgbFg] parameter is ? >> >> Have a look at these two pages on the MSDN for more information on the call and meaning of the various flags: >> http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/imagelist/structures/imagelistdrawparams.asp >> http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/imagelist/enums/imagelistdrawflags.asp >> Hope this helps, >> >> Mike >> >> >> - Microsoft Visual Basic MVP - >> E-Mail: XXXX@XXXXX.COM >> WWW: Http://EDais.mvps.org/ >> >> < < < < < < <Thanks Mike, I've already seen this. This is the
reason I've posted this..< < < <And problem comes with rgbFg< < < <rgbFg< <Image foreground color. This member is used only
if<