Solved

VC++ MFC Programming - Resizing of window

Posted on 2007-11-22
7
4,476 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 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
Webinar: MongoDB® Index Types

Join Percona’s Senior Technical Services Engineer, Adamo Tonete as he presents “MongoDB Index Types, How, When and Where Should They be Used?” on Wednesday, July 12, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7).

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
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.

623 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