RE: [GD-Windows] In memory bitmap to HBITMAP
Brought to you by:
vexxed72
From: Brian H. <bri...@py...> - 2001-12-07 16:05:57
|
At 10:40 AM 12/7/2001 +0000, Andrew Grant wrote: >CreateCompatibleDC creates a memory DC. By default memory DC's have a 1x1 >monochrome surface so when you call CreateDIBitmap you are creating a bitmap >which is the same type as that DC, e.g monochrome. Try passing in the DC of >your window instead to CreateDIBitmap. Someone else mentioned this to me off-list, and I felt stupid because the help says this. But I don't feel THAT stupid because, well, look at the name of the function and I was passing in "NULL", which means (to me) "Create a DC compatible with the screen". And I'm not running in monochrome, thank you =) But as you say, DC compatibility doesn't mean color depth compatibility, it means "device characteristic" compatibility. So, yeah, I guess it was a stupid newbie error =) I'll give the various suggestions a shot today, thanks! Brian |