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

x
?
Solved

VC++ MFC Programming - Resizing of window

Posted on 2007-11-22
7
Medium Priority
?
4,526 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
[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
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 128 total points
ID: 20338022
0
 
LVL 2

Assisted Solution

by:AshvinPatel
AshvinPatel earned 124 total points
ID: 20338220
check http://support.microsoft.com/kb/262954 for scroll in dialog
0
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 
LVL 19

Assisted Solution

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

Assisted Solution

by:DanRollins
DanRollins earned 124 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

722 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