Transparent Splash Window

Environment: VC6 Windows98/NT/2000

Do you want to cool splash window?. The general splash window is not good for your app??
This sample source is for you.

My semi-transparent splash window use ‘AlphaBlend’ function.
When I found this function, I was so surprised!!

Here is ‘AlphaBlend’ function’s feature.


BOOL AlphaBlend( HDC hdcDest,
int nXOriginDest,
int nYOriginDest,
int nWidthDest,
int nHeightDest,
HDC hdcSrc,
int nXOriginSrc,
int nYOriginSrc,
int nWidthSrc,
int nHeightSrc,
BLENDFUNCTION blendFunction
);

The important parameter is last one,BLENDFUNCTION.


typedef struct _BLENDFUNCTION {
BYTE BlendOp;
BYTE BlendFlags;
BYTE SourceConstantAlpha;
BYTE AlphaFormat;
}BLENDFUNCTION, *PBLENDFUNCTION, *LPBLENDFUNCTION;

We use ‘SourceConstantAlpha’ value.
You can set this value between 0(transparent) and 255(semi-transparent).

Downloads

Download demo project – 47 Kb

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read