Compartilhar via


Dialog Box Classes

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Dialog Box Classes.

Class CDialog and its derived classes encapsulate dialog-box functionality. Since a dialog box is a special kind of window, CDialog is derived from CWnd. Derive your dialog classes from CDialog or use one of the common dialog classes for standard dialog boxes, such as opening or saving a file, printing, selecting a font or color, initiating a search-and-replace operation, or performing various OLE-related operations.

CDialog
The base class for all dialog boxes, both modal and modeless.

CDataExchange
Supplies data exchange and validation information for dialog boxes.

Common Dialogs

These dialog box classes encapsulate the Windows common dialog boxes. They provide easy-to-use implementations of complicated dialog boxes.

CCommonDialog
Base class for all common dialog boxes.

CFileDialog
Provides a standard dialog box for opening or saving a file.

CColorDialog
Provides a standard dialog box for selecting a color.

CFontDialog
Provides a standard dialog box for selecting a font.

CFindReplaceDialog
Provides a standard dialog box for a search-and-replace operation.

CPrintDialog
Provides a standard dialog box for printing a file.

CPrintDialogEx
Provides a Windows 2000 Print property sheet.

CPageSetupDialog
Encapsulates the services provided by the Windows common Page Setup dialog box with additional support for setting and modifying print margins.

OLE Common Dialogs

OLE adds several common dialog boxes to Windows. These classes encapsulate the OLE common dialog boxes.

COleDialog
Used by the framework to contain common implementations for all OLE dialog boxes. All dialog box classes in the user-interface category are derived from this base class. COleDialog cannot be used directly.

COleInsertDialog
Displays the Insert Object dialog box, the standard user interface for inserting new OLE linked or embedded items.

COlePasteSpecialDialog
Displays the Paste Special dialog box, the standard user interface for implementing the Edit Paste Special command.

COleLinksDialog
Displays the Edit Links dialog box, the standard user interface for modifying information about linked items.

COleChangeIconDialog
Displays the Change Icon dialog box, the standard user interface for changing the icon associated with an OLE embedded or linked item.

COleConvertDialog
Displays the Convert dialog box, the standard user interface for converting OLE items from one type to another.

COlePropertiesDialog
Encapsulates the Windows common OLE Properties dialog box. Common OLE Properties dialog boxes provide an easy way to display and modify the properties of an OLE document item in a manner consistent with Windows standards.

COleUpdateDialog
Displays the Update dialog box, the standard user interface for updating all links in a document. The dialog box contains a progress indicator to indicate how close the update procedure is to completion.

COleChangeSourceDialog
Displays the Change Source dialog box, the standard user interface for changing the destination or source of a link.

COleBusyDialog
Displays the Server Busy and Server Not Responding dialog boxes, the standard user interface for handling calls to busy applications. Usually displayed automatically by the COleMessageFilter implementation.

Property Sheet Classes

The property sheet classes allow your applications to use property sheets, also known as tabbed dialogs. Property sheets are an efficient way to organize a large number of controls in a single dialog box.

CPropertyPage
Provides the individual pages within a property sheet. Derive a class from CPropertyPage for each page to be added to your property sheet.

CPropertySheet
Provides the frame for multiple property pages. Derive your property sheet class from CPropertySheet to implement your property sheets quickly.

COlePropertyPage
Displays the properties of an OLE control in a graphical interface, similar to a dialog box.

HTML-based Dialog Classes

CDHtmlDialog
Used to create dialog boxes that implement their user interface with HTML rather than dialog resources.

CMultiPageDHtmlDialog
Displays multiple HTML pages sequentially and handles the events from each page.

These classes are not dialog boxes per se, but they use dialog box templates and have much of the behavior of dialog boxes.

CDialogBar
A control bar that is based on a dialog box template.

CFormView
A scroll view whose layout is defined in a dialog box template. Derive a class from CFormView to implement a user interface based on a dialog box template.

CDaoRecordView
Provides a form view directly connected to a Data Access Object (DAO) recordset object. Like all form views, a CDaoRecordView is based on a dialog box template.

CRecordView
Provides a form view directly connected to an Open Database Connectivity (ODBC) recordset object. Like all form views, a CRecordView is based on a dialog box template.

CPrintInfo
A structure containing information about a print or print preview job. Used by the printing architecture of CView.

See Also

Class Overview