Solved

How do I make my Program Resolution Independent

Posted on 1998-04-14
4
238 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
  • 3
4 Comments
 
LVL 10

Accepted Solution

by:
RONSLOW earned 100 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Need to retreive data from .TFS file exported by DVR 8 166
dog bark java program 15 82
move a line in eclipse 3 60
Making an alias 7 54
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now