Chapter 12: Dialog-Based Windows Visual C++ and MFC Fundamentals
12.1.4..Dialog Box Dimensions.....................................................................
The dimensions of a dialog box are its width and its height. At design time, to set the
desired width, position the mouse to its right border until the mouse pointer appears as a
horizontal double arrow Then click and drag left or right.
To set the desired height, position the mouse to the bottom border until the mouse cursor
appears as a vertical double arrow. Then click and drag up or down.
To set both the width and the height in one operation, position the mouse in the bottom-
right corner until the mouse pointer becomes a North-West – South-East diagonal double
arrow. Then click and drag up, down, left, or right as necessary.
While dragging in any of these operations, you can refer to the right section of the status
bar to get the current width and height. In the resource file, the width and the height of
the dialog box follow the location values. Here is an example:
IDD_SCHOOL_SURVEY DIALOGEX 0, 0, 340 , 268
There are other items that can be entered on this first line but the identifier, the
DIALOGEX statement, the location, and the dimensions are required.
Practical Learning: Setting Dialog Box Dimensions
- If you are using MSVC 6, close the Properties window
Position the mouse to the right border of the dialog box with a horizontal mouse
cursor - Click and hold the mouse. Then drag in the right direction. Meanwhile, observe the
change of the width on the Status Bar