How to display few bitmaps on the same coordinations.

I have four bitmaps.
I have to display every of them on x = 0 and y = 0 coordinations.
My task is to display only color different to white.
White color is the mask of the bitmaps.
Last edited on
Caps Lock? Which OS are you using? Which Graphic Library (if you are using one) are you using? Some code?
I use only winapi.
Last edited on
EssGeEich wrote:
Caps Lock?

It isn't going to take more people in this topic.
I'm sorry:
I give code which display bitmaps:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
HDC_NEW = CreateCompatibleDC(HDC);
HDCCOPY = CreateCompatibleDC(HDC);
HCOPY[K] = CreateCompatibleBitmap(HDC , 100 , 100);
BITMAP INFO;
GetObject(BITMAP[K] , sizeof(INFO) , & INFO);
MASK[K] = CreateBitmapMask (BITMAP[K], RGB(255, 255, 255));  
    
SaveDC(HDCCOPY);
SelectObject(HDCCOPY , HCOPY[K]);
BitBlt(HDCCOPY , 0 , 0 , 100 , 100 , HDC , X , Y , SRCCOPY);
            
SelectObject(HDC_NEW , MASK[K]);
BitBlt(HDCCOPY , 0 , 0 , 100 , 100 , HDC_NEW , 0 , 0 , SRCAND);
            
SelectObject(HDC_NEW , BITMAP[K]);
BitBlt(HDCCOPY , 0 , 0 , 100 , 100 , HDC_NEW , 0 , 0 , SRCPAINT);
            
SelectObject(HDCCOPY , HCOPY[K]); 
BitBlt(HDC , X , Y , 100 , 100 , HDCCOPY , 0 , 0 , SRCCOPY);


But to be funny, what I can I'm writing with big letters at least in code.
Last edited on
Are you sure your bitmaps's "white space" is COMPLETELY white? (Probably a little distortion will make your "CreateBitmapMask" have a different way to work)
Or, you can simply add your alpha channel with a GFX editing software just like GIMP.

Personally, i don't use WINAPI that much for Image works, but everything looks ok.
Topic archived. No new replies allowed.