Big window in a small window [winapi or mfc]
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...
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,
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,
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement