Give that a shot and let me know if you need more help.
------------------
-Kentamanos
Give that a shot and let me know if you need more help.
------------------
-Kentamanos
I have a pointer which contains my 640x480x24bit data, (BYTE* imageData).
I need to create an HBITMAP to pass on to DDCopyBitmap so I can load the image data onto a DDraw surface.
I have filled out a BITMAPINFO called lpbi,
then i make an HDC and the bits pointer, then create the hbitmap...
HDC hDC = GetDC( NULL );
BYTE* BitmapBits = NULL;
HBITMAP hBitmap = CreateDIBSection(hDC,lpbi,
DIB_RGB_COLORS,(void**)&BitmapBits,
NULL, 0)
ok i have an hbitmap with empty data,
?? what next ??
should I memcpy the imageData to the BitmapBits, then do a DDCopyBitmap(..)
Or can I assign the 4th param in CreateDibSection to my imageData?
(preffered to save memory space)
I have tried using CreateBitmap but it doesnt work properly.
Any ideas?
the memcpy way worked, but still I am allocating too much memory, can I assign the 4th param to the imageData (already contains the bitmap data)?
Also,
my image files are 24bit, but my surfaces are 16bit. Does DDraw (DDCopyBitmap) altomatically convert the bitmaps to 16bit when dumping them to the surface? Or are the surfaces actually 24bit, but when blitted convert to 16bit?