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.