• Advertisement
Sign in to follow this  

[GDI] Does anyone know how to create a memory DC that is not 1x1 monochrome?

This topic is 4247 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

...without loading a bitmap, that is? When I create a memory DC and make it compatible with the DC of my window, it makes it compatible in the sense that it has the same functionality, but according to MSDN, the DC is only 1x1x1-bit. Is there a way to just specify the dimensions and bit depth that I want? It seems that the only way to do that is to load a bitmap into it which, itself, has the pixel dimensions and bit depth that I need. I can load a blank bitmap if needed, but I'd rather not because it seems like a hack.

Share this post


Link to post
Share on other sites
Advertisement
Selecting a bitmap into the DC is actually the way to go.

The DC is merely a interface that lets you draw stuff to something, but A DC isn't a drawing target by itself. If you are drawing to the screen, it has the screen as drawing target, but if you want to draw to an offscreen target, you have to create this drawing target yourself, as a bitmap.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement