Visual C++ and MFC Fundamentals Chapter 12: Dialog-Based Windows
the control. The location would be where you clicked, even if you clicked between two
dots. The dimensions would stop where you released the mouse, even it if was between
two dots.
After placing a control on a parent window that displays grids, the borders of the child
control can only be aligned with the black dots. The grids are separated using a measure
called the Dialog Box Unit or DLU. By default, two vertically aligned dots are separated
by a height of 5 DLUs. Two horizontally aligned dots are separated by a width of 5
DLUs. If these measures are too high, there are two options you can use:
??After placing the control, to control its location with more precision, press the up,
left, right, or down arrow keys (on the keyboard). In this case, the control would
move by one pixel in the direction of your choice. To control its size, press and hold
Shift. Then press the up or down arrow keys to move only the bottom border of the
control; or press the left or right keys to move the right border of the control.
??To modify the distance between dotted grids, display the Guide Settings dialog box
available from the Layout (MSVC 6) or Format (MSVC 7) menu then modify the
Width and/or Height values in the Grid Spacing section:
13.4.3..Control’s Location and Size Without Grids....................................
Visual C++ also allows you to position controls without using grids. If you do not want to
use the grids, you can hide them. This is done by clicking the Toggle Guides button ,
a (blue dotted) rectangle appears in the client area: