Big window in a small window [winapi or mfc]

Started by
1 comment, last by BeerNutts 18 years ago
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...
br,Zolee------
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,
Sounds like, "Fat guy in a little coat."

(I couldn't resist :)

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

This topic is closed to new replies.

Advertisement