Link to home
Start Free TrialLog in
Avatar of Vakils
VakilsFlag for United States of America

asked on

Windows FormView Application: How do I ensure that forms fit display without scrolling.

I am working on a Windows Application written In Visual Studio MFC. The application has CFormView  derived child windows.  
The application was written for 14" CRT monitors. Now all the users have 24" monitors and so the forms appear small. In short, we are not making full use of screen real estate. So we decided to enlarge the forms for 1980x1080 resolution (the recommended resolution for most users).  This was good for most users, however some critical users are complaining. They are those who use dual monitors, different screen resolutions, fonts, font size. They want original screen size back. How to deal with such a situation? Is there a programmatic way?
ASKER CERTIFIED SOLUTION
Avatar of sarabande
sarabande
Flag of Luxembourg image

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
Avatar of Vakils

ASKER

Hi Sara,
Option 2 is not feasible as we have about 40 form views each having lots of controls. Option 1, needs to be tweaked for run time. But, creating another set of views for low resolution is again a time consuming effort, which we don't have. I was looking for a solution like in web based application, Ctrl + or - would change the size of page you are viewing.  It seems that there is no such easy option for apps where each user has personalized resolution, font and it's size. Some have dual monitors. So we are going back to original resolution.
I was looking for a solution like in web based application, Ctrl + or - would change the size of page you are viewing.
why not changing your form views to html views?

Option 2 is not feasible as we have about 40 form views each having lots of controls.
you may derive a class from CFormView and derive all your form view classes from that. then you could encapsulate all the resizing stuff into the new class.

from my experience option 1 is the easiest, best looking and less error-prone method. you probably already have both the resources and the concept easily could be enhanced to additional scales if required.

Sara
Avatar of Vakils

ASKER

Hi Sara,
Sorry for delayed reply. Can you attach a small sample using html view?
Avatar of Vakils

ASKER

Hi Sara,
Thanks for the link. From samples,  CHTMLView is used basically to render a web page or for making web browser based app, which is not the intent here. Our forms have grids and controls and data is pulled from database. and to render them in HTML would take resources (time and money) that otherwise will be used in enhancing/adding functionality to the app. Also, a HTML based web client is being developed to replace C++ MFC front-end.
In short, it's a low priority item.
But, thanks anyway, it seems the solution you gave- have two resource ID's per form window form, is simplest and elegant, but again it gets convoluted where we invoke a form window from another form window using resource ID or check whether user has access permission to a particular form.
Regards,
-vakils-