Re: DrawIconEx weirdness under Win2K
- From: "Mike D Sutton" <EDais@xxxxxxxx>
- Date: Mon, 19 Sep 2005 10:54:36 +0100
> I use DrawIconEx to draw an icon onto a metafile DC.
> Everything works ok under WinXP but under Win2K I get a black square.
>
> What am I doing wrong?
>
> Code below is a simplified version of what I'm using (needs to be pasted in
> Form1 of a standard project and needs an icon in Form_Load).
If your icon has an alpha channel then DrawIconEx() under Win2K won't interpret it correctly and simply draws the 24-bit data
instead, this could be the cause of your problem. If this is the case then simply select the colour Bitmap returned to you in the
GetIconInfo() call into a temporary DC and AlphaBlend() it instead.
Hope this helps,
Mike
- Microsoft Visual Basic MVP -
E-Mail: EDais@xxxxxxxx
WWW: Http://EDais.mvps.org/
.
- References:
- DrawIconEx weirdness under Win2K
- From: Andy DF
- DrawIconEx weirdness under Win2K
- Prev by Date: Re: DrawIconEx weirdness under Win2K
- Next by Date: Re: Access Violation Exception
- Previous by thread: Re: DrawIconEx weirdness under Win2K
- Next by thread: Transparent Checkbox
- Index(es):
Relevant Pages
|