Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Resizing CDCs and CBitmaps

This topic is 5799 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

I have a CDC and a CBitmap that I am using as a back buffer for my MFC app. I want to be able to resize them if the user resizes the window. Is there a way to simply resize the CDC''s and the CBitmap''s dimensions, or do I have to destroy and create them again? I am having trouble figuring out exactly how to delete/release them, and I was unable to find any "resizing" functions in the MSDN. My other thought was to simply have a large CDC/CBitmap created right away, and simply use the portion of it that I need for the current window''s size. Does any one have any answers/ideas? Thanks in advance, Mike

Share this post

Link to post
Share on other sites
Unless MFC has some resizing function (which you said it didn''t) then you''ll have to delete and then recreate the bitmap and then select it back into the DC. (You don''t have to touch the DC itself since they take the size of the bitmap)

The hackers must have gotten into the system through the hyperlink!!

Invader''s Realm

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!