Visual C++ and MFC Programming 2nd Edition

(Martin Jones) #1

Chapter 12: Dialog-Based Windows Visual C++ and MFC Fundamentals



  1. When the height values gets to 150, release the mouse

  2. If you are using MSVC 6, display the Properties window


12.1.5..Windows Styles for a Dialog Box....................................................


As the most regular used parent of Windows controls, a dialog box must have some
characteristics that would allow it to be as efficient as possible. The characteristics of a
dialog box, as done with the controls, are referred to as its styles. In the resource file, to
specify these aspects, start a line with the STYLE keyword:

IDD_SCHOOL_SURVEY DIALOGEX 0, 0, 340, 268
STYLE

WS_CAPTION: Because a dialog box serves only to hold other objects, it should
indicate what it is used for. The top side of a dialog box is made of a horizontal section
that we call the title bar. To have a title bar on a dialog box, it must be created with the
WS_CAPTION style:

IDD_SCHOOL_SURVEY DIALOGEX 0, 0, 340, 268

STYLE WS_CAPTION

Height
Free download pdf