B&W bitmap ???
-
-
Hi! I need a safe way to acquire a colored bitmap... Now, I do it like hDC = CreateCompatibleDC(NULL) hBitmap = CreateBitmap(params...hDC...) but it's still B&W any ideas? Thanks! PS: running 98 if you find this relevant. No window handle available
Can you post more or your code? What are you passing CreateBitmap for UINT cPlanes and UINT cBitsPerPel? Todd Smith
-
Can you post more or your code? What are you passing CreateBitmap for UINT cPlanes and UINT cBitsPerPel? Todd Smith
-
CreateBitmap( width, height, GetDeviceCaps( hTempDC, PLANES ), GetDeviceCaps( hTempDC, BITSPIXEL ), NULL ); and I get the dc like hTempDC = CreateCompatibleDC(NULL)
Check what GetDeviceCaps( hTempDC, PLANES ) and GetDeviceCaps( hTempDC, BITSPIXEL ) are returning. I suspect GetDeviceCaps( hTempDC, BITSPIXEL ) is not 8 or greater which is required for a color image. If you want a 256 color image then use 8 otherwise use 24. Todd Smith