How do you concatenate several bitmaps into a single bitmap?
I don't know enough about GDI+, but the normal method is:
Load the .bmp files into separate memory buffers, and then copy segments (lines) of them onto one big buffer. Finally, save it into a .bmp file. But you should learn the .bmp file format (find it at www.wotsit.org)
Create a bitmap in a memory DC. It size is the size of the two bitmaps
Select the new bitmap into the memory DC
Select the first orginal bitmap into a DC
copy with BitBlt or StretchBlt form the hDC to the memory DC
Select the second original bitmap into a DC
copy with BitBlt or StretchBlt form the hDC to the memory DC
Example :
The first bitmap is 256 * 384.
The second has the same size.
The resulting bitmap will be 512 * 384
INVOKE GetDC,hWnd
mov hDC,eax
INVOKE CreateCompatibleDC,hDC
mov hDCMem,eax
invoke CreateCompatibleBitmap,hDC,512,384
mov hBmpResult,eax
invoke SelectObject,hDCMem,eax
mov hBmpMem,eax
invoke SelectObject,hDC,hBmp_1
mov hBmpOld,eax
invoke BitBlt,hDCMem,0,0,256,384,hDC,0,0,SRCCOPY
invoke SelectObject,hDC,hBmp_2
invoke BitBlt,hDCMem,256,0,256,384,hDC,0,0,SRCCOPY
invoke SelectObject,hDC,hBmpOld
invoke SelectObject,hDCMem,hBmpMem
; Now initialize a BITMAPINFO Structure
; Only the 6 first parameter are required
; Call GetDIBits to get all the bitmap bits
After that you can write the bitmap to the file
The BITMAPFILEINFOHEADER has to be initialized before.