DrawState (CDC) problem
-
Hello, how can i draw an image that would be transparent? which means will get the background of where it is drawn.... this is the code i use to draw the image:
HBITMAP hBmp = pDlgInf->GetBmp();
CPoint pnt(rc.left + SPACE_WIDTH / 5,rcText.top);
CSize size(IMAGE_DIMENTIONS,IMAGE_DIMENTIONS);
pDC->DrawState(pnt,size,hBmp,DST_BITMAP);i see the image fine, but it is not transparent...the transparent color (0,128,128) is shown there... can any1 help? thanks in advanced Yaron Ask not what your application can do for you, Ask what you can do for your application
-
Hello, how can i draw an image that would be transparent? which means will get the background of where it is drawn.... this is the code i use to draw the image:
HBITMAP hBmp = pDlgInf->GetBmp();
CPoint pnt(rc.left + SPACE_WIDTH / 5,rcText.top);
CSize size(IMAGE_DIMENTIONS,IMAGE_DIMENTIONS);
pDC->DrawState(pnt,size,hBmp,DST_BITMAP);i see the image fine, but it is not transparent...the transparent color (0,128,128) is shown there... can any1 help? thanks in advanced Yaron Ask not what your application can do for you, Ask what you can do for your application
-
DrawState can draw transparent icons only. To draw a transparent bitmap, use the ::TransparentBlt function.
Thanks for the reply, i tried to use TransparentBlt, and i saw the image as transparent, but i got an other problem , if i moved the dialog outside the screen boundaries and then drag it back in, the image was fundged....it didn't appear well. can u help? thanks again Yaron Ask not what your application can do for you, Ask what you can do for your application
-
Thanks for the reply, i tried to use TransparentBlt, and i saw the image as transparent, but i got an other problem , if i moved the dialog outside the screen boundaries and then drag it back in, the image was fundged....it didn't appear well. can u help? thanks again Yaron Ask not what your application can do for you, Ask what you can do for your application