Solved

VC++ MFC Programming - Resizing of window

Posted on 2007-11-22
7
4,421 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Auto Apply Receivables Credit Memos to Invoices in Microsoft Dynamics GP 1 117
Best IDE for PHP starters 11 123
Problem to open text file 11 110
Problem to App source 6 39
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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

770 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