Solved

VC++ MFC Programming - Resizing of window

Posted on 2007-11-22
7
4,409 Views
Last Modified: 2013-12-14
I have a dialog based MFC application. In my main dialog i have a Tab Control. 3 dialog windows are created and mapped to the tab control.
The Dialog properties of Main Dialog are:
Under the Style tab,
Style: Popup, Border:Dialog Frame, Title Bar:Checked, System Menu:Checked, MinimizeBox:Checked,MaximizeBox:Checked
The properties of these 3 child dialog windows are
Under the Style Tab,
Style: Child , Border: Thin, Rest are unchecked.
I have placed some controls on these child dialog box.
I have been working with 1400 by 1050 pixels Resolution. I do not see any problem.
When I decrease the resolution to 1280 by 768 pixels, at run time,  the controls placed towards the end of the dialogs are not seen  and cannot be accessed.
How can this problem be handled.It will be of great help if some one shows the light.

Actually i tried enabling the vertical scroll bar property for the child dialog under the Style tab of Dialog properties. It doesn't seems to be helpful. I am not sure if we have to handle some message maps for the same.
Please suggest the methods to overcome this problem.

Thanks in advance.
0
Comment
Question by:umaiyer
7 Comments
 
LVL 14

Expert Comment

by:puranik_p
ID: 20337897


//You can write this code in OnInitDialog to initialize the screen

    int width = ::GetSystemMetrics(SM_CXSCREEN);
    int height = ::GetSystemMetrics(SM_CYSCREEN);
    MoveWindow(50,50, width/2, height/2);
   //    Arrange Other controls accordingly
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 32 total points
ID: 20338022
0
 
LVL 2

Assisted Solution

by:AshvinPatel
AshvinPatel earned 31 total points
ID: 20338220
check http://support.microsoft.com/kb/262954 for scroll in dialog
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 19

Assisted Solution

by:alb66
alb66 earned 31 total points
ID: 20338289
You may design the dialog at the lower resolution
0
 
LVL 49

Assisted Solution

by:DanRollins
DanRollins earned 31 total points
ID: 20356468
My 2 cents:
alb66's suggestion is the best.  

Note that Windows -- and all top-flight major software -- never use gigantic property boxes (1400 is just enormous).  They stick with smallish tabbed dialogs (PropertySheets) and put just a few controls on each property page.  If there is some additional complexity, then they add an
 [Advanced...]
button to bring up a separate modal dialog that pops up over the main dialog.

About the only time you see a dialog larger than about 400 or 500 wide is because it contains an element such as a Listview control that extends to the bottom and to the right and in that case, they allow the dialog to be manually re-sized by the user and doing so only affects the size (and not the origin/location) of that one control.

-- Dan
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20591121
Forced accept.

Computer101
EE Admin
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
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.

746 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

14 Experts available now in Live!

Get 1:1 Help Now