CreateCompatibleBitmap() from Un-released DC

Hey there,
I just tracked down a bug within my source code, where my use of CreateCompatibleBitmap() is returning NULL.

I have a hunch that it is because I haven't released the DC, before trying to use it to create a bitmap.

If a DC is not released, can you still create a bitmap from it?

NOTE: The device context in question is not a WindowDC, it's a PrivateDC. Hence, the reason I didn't release it.
If a DC is not released, can you still create a bitmap from it?


Yes. Are you sure the DC handle is valid?
What exactly is a "PrivateDC" ? Where does it came from ? It is a class ?
It belongs to a class.
Similar to that of a BackBuffer.
Registered users can post here. Sign in or register to post.