Jump to content
  • Advertisement
Sign in to follow this  
zolee

Big window in a small window [winapi or mfc]

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

Hi gurus, what I would like is to have a dialog (form), that is lets say, 320x200 pixels in size, and it would have a, lets say 200x150 area in it, that I would use as a canvas to draw on. But this canvas should be virtually larger than 200x150.. for example 1024x768. And I would use scrollbars to navigate. I am familiar with GDI basics, but this is too advanced for me :-) Give me a clue please...

Share this post


Link to post
Share on other sites
Advertisement
The easier way to do this using the MFC is to inherit a class from Cwnd (or even easier: CStatic). Override OnCreate in order to create the scroll bars (CScrollBar objects). You might also override OnNcCalcSize() in order to correctly setup the client coordinates. Once you've done this, you'll have to play with OnHScroll() and OnVScroll() in order to handle the scrolling.

This is not very difficult, and searching how to do this exactly will certainly improve your MFC coding :)

If you have some questions, we'll be glad to help you.

Regards,

Share this post


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

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!