Alpha blend Problem
- From: tapan.x.bansal@xxxxxxxxx
- Date: Sun, 2 Mar 2008 06:56:00 -0800 (PST)
Hi ,
I am trying to alpha blend a transparent image on the screen and on a
key event i try to toggle it with a different transparent image on the
same position..
The first image is drawn fine ,but when i click the key to toggle ,the
image is distorted i.e first image is there along with second image
sharing space alotted to them i.e. the first image isn't vanished from
screen.
i use this piece of code after loading the bitmap on screen and
passing the pvbits .
VOID *pvBits;
pvbits = malloc(sizeof(hbm));
pvbits = (HBITMAP)hbm;//i am susceptible at this step
HBITMAP hBmp = CreateDIBSection(hMemDC, &bmi, DIB_RGB_COLORS, &pvBits,
NULL, 0);
SelectObject(hMemDC, hBmp);
//setting the blend function and its coordinates
BLENDFUNCTION bf;
AlphaBlend(hdc,x cord,y cord, bmi.bmiHeader.biWidth,
bmi.bmiHeader.biHeight, hMemDC, 0, 0, bmi.bmiHeader.biWidth,
bmi.bmiHeader.biHeight, bf));
.
- Prev by Date: Specific problem with 32bit (rgba) images and AlphaBlend on different screen resolutions
- Next by Date: Alpha blend problem toggling two images
- Previous by thread: Specific problem with 32bit (rgba) images and AlphaBlend on different screen resolutions
- Next by thread: Alpha blend problem toggling two images
- Index(es):
Relevant Pages
|