Subclassing Common Dialog Boxes Other Than Open and Save As
The previous material covered subclassing the Explorer-style Open and Save As common dialog boxes. This section covers subclassing all other types of common dialog boxes. The techniques in this section pertain to these common dialogs:
| Color |
| Font |
| Print Property Sheet (Win2000) |
| Page Setup |
| Find |
| Replace |
The Dialog Template Resource
The foremost difference between the Open and Save As common dialogs and the remaining common dialogs is how the dialog template resource is created. With the Open and Save As common dialogs, a separate child dialog had to be created and integrated into the parent common dialog box. This is necessary because the dialog resource for these two common dialogs is embedded in the comdlg32.dll. Not so with these other common dialog boxes. Their dialog resources are available in C++ header files (*.h) and in resource (*.dlg) files. The header files contain all the control IDs for each control on these dialogs. The resource files contain the actual dialog resource. Table 5-7 lists all resource IDs, header files, and resource files that each common dialog box uses. These files are shipped with the Visual C++ development environment.
Table 5-7. Resource IDs, Header Files, and Resource Files of the Common Dialog Boxes
|
Dialog type |
Resource ID |
Resource File |
Header File |
|---|---|---|---|
|
Color |
|
Color.dlg |
ColorDlg.h |
|
Font |
|
Font.dlg |
Dlgs.h |
|
|
|
Prnsetup.dlg ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access