Link to home
Start Free TrialLog in
Avatar of psapra
psapra

asked on

Resizing in applications developed with MFC

How can I resize the view of an SDI application (developed in C++ using MS Developer studio) so that the view fits on the screen irrespective of the resolution of the monitor it is running on ? Is there a simple way out to do so or do I need to implement a rather complex resizing logic to format the view depending on the available display area ?
Avatar of galkin
galkin

View is occupied client area of the parent frame. You need to change frame size. To maximize frame call AgxGetMainWnd()->ShowWindow(SW_SHOWMAXIMIZED)
Avatar of psapra

ASKER

I guess I did not make my question clear. The view has been designed using the developer studio, which means that every control on the form has a fixed position. It whole form fits nicely on a 1024x768 resolution with small fonts. If the font size is changed to large fonts, the whole application view does not fit on the window and it is necessary to scroll vertically and horizontally to see the entire window. Is there a way to fix this ?
You run into one of more annoying limitations of diaolg templates. However, overcoming that limitation does requre extensive coding. For a generic way to do it, look at GridBagLayout class in Java. You may come up with something much simpler according to your specific form. In any case, extensive programming is enevitable.
ASKER CERTIFIED SOLUTION
Avatar of piano_boxer
piano_boxer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
For dynamic dialog templates go to
http://www.codeguru.com/dialog/dialog_toc.shtml
Avatar of psapra

ASKER

piano_boxer:

I tried doing what you suggested, but it still doesn't resize the application view. Can you offer any further help ?