Re: Fading images with AlphaBlend
From: Jason Doucette (www.jasondoucette.com)
Date: 10/13/04
- Next message: Jerry22: "UpdateLayeredWindow Failed"
- Previous message: Jason Doucette: "Re: how to resize child window?"
- In reply to: Pelle: "Fading images with AlphaBlend"
- Next in thread: Pelle: "Re: Fading images with AlphaBlend"
- Reply: Pelle: "Re: Fading images with AlphaBlend"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 13 Oct 2004 09:29:28 -0300
Pelle,
> 1) I can erase the background each time I redraw (WM_PAINT) my screen
> increasing my global alpha with every redraw until my MAX-Alpha is
> reached. But this causes the application to flicker - not very nice
> indeed.
Try the WS_EX_COMPOSITED style to enable double buffering for the window.
This should allow all drawing to take place on a behind-the-scenes second
buffer. When all drawing is complete, it will only THEN be blitted to the
window for you to see.
>From MSDN: "Windows XP: With WS_EX_COMPOSITED set, all descendants of a
window get bottom-to-top painting order using double-buffering.
Bottom-to-top painting order allows a descendent window to have translucency
(alpha) and transparency (color-key) effects, but only if the descendent
window also has the WS_EX_TRANSPARENT bit set. Double-buffering allows the
window and its descendents to be painted without flicker."
---------
Jason Doucette
http://www.jasondoucette.com/
- Next message: Jerry22: "UpdateLayeredWindow Failed"
- Previous message: Jason Doucette: "Re: how to resize child window?"
- In reply to: Pelle: "Fading images with AlphaBlend"
- Next in thread: Pelle: "Re: Fading images with AlphaBlend"
- Reply: Pelle: "Re: Fading images with AlphaBlend"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|