แก้ไข

แชร์ผ่าน


Dialog Boxes

Applications for Windows frequently communicate with the user through dialog boxes. Class CDialog provides an interface for managing dialog boxes, the Visual C++ dialog editor makes it easy to design dialog boxes and create their dialog-template resources, and Code wizards simplify the process of initializing and validating the controls in a dialog box and of gathering the values entered by the user.

Dialog boxes contain controls, including:

  • Windows common controls such as edit boxes, pushbuttons, list boxes, combo boxes, tree controls, list controls, and progress indicators.

  • ActiveX controls.

  • Owner-drawn controls: controls that you are responsible for drawing in the dialog box.

Most dialog boxes are modal, which require the user to close the dialog box before using any other part of the program. But it is possible to create modeless dialog boxes, which let users work with other windows while the dialog box is open. MFC supports both kinds of dialog box with class CDialog. The controls are arranged and managed using a dialog-template resource, created with the dialog editor.

Property sheets, also known as tab dialog boxes, are dialog boxes that contain "pages" of distinct dialog-box controls. Each page has a file folder "tab" at the top. Clicking a tab brings that page to the front of the dialog box.

What do you want to know more about

See also

User Interface Elements