|
-
August 19th, 2009, 10:34 AM
#1
how to create 32bit color HBITMAP object
Hi Everyone,
I ran into a problem. I am creating a memory device context and a compatible bitmap object. It seems to be when I try to draw anything on it, it turns out to be black or white. I could not understand it. I pasted my code how I am creating the bitmap object.
Any idea will be helpful.
HDC hScreenDC = ::GetDC( NULL );
// Create memory DC
mDC = ::CreateCompatibleDC( hScreenDC );
// Create bitmap compatible with screen device context
mBitmap = ::CreateCompatibleBitmap( hScreenDC, 200, 200 );
mOldBitmap = (HBITMAP)::SelectObject( mDC, mBitmap );
Thanks in advance.
Regards.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|