Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I make my Program Resolution Independent

Posted on 1998-04-14
4
Medium Priority
?
248 Views
Last Modified: 2013-11-20
I'm developing an application in VC++5.0 using MFC. My application is Form based (Forms are created using CFormView class) and I switch from one form(view) to another using the push button controls on the Form.My problem is that  when I run the program under different resolutions, it's appearence changes. The form(view)s  covers the entire screen (i.e.,I have maximised the Main Frame window and MDI child windows using appropriate functions), but the controls on the form don't grow or shrink proportionally. So, it gives a very ugly look to my application when run under a different resolution. I have developed the application at 800* 600 display resolution and it's MDI based Document View application.
0
Comment
Question by:akshaya
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 10

Accepted Solution

by:
RONSLOW earned 300 total points
ID: 1317685
There is a shareware (I think) library called NSViews that does automatic resizing/moving of controls when views/forms/dialogs change in size.

0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1317686
0
 

Author Comment

by:akshaya
ID: 1317687
Thanks Mr. Ronslow . I have already developed the application and it's running fine. I only need to fix the resolution problem. But, if I adopt your solution, I may have to rewrite the entire application using the NSViews library that you have suggested. My application is a big one consisting of odd 20 or more forms and it would be a very tedious task to rewrite the entire thing. Do you have any other suggestion? Please help.
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1317688
If you know your dialog looks fine at 800x600 and you detect you are running at, say, 400x300, then you could simply go thru each child window of the view (ie. the controls) and get their positions and scale the size and/or position accordingly.  This is effectively what the NSViews library does.. only it gives you more control over how each control is effected by a change in size.

0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question