|
Custom Templates
Common dialog boxes have default templates that define the number, type, and
position of the standard controls in the dialog box. You can define a custom
template to give users access to additional controls that are unique to your
application.
For all common dialog boxes except the Explorer-style Open and Save As dialog
boxes, you modify the default template to create a custom template that
replaces the default template. The custom template defines the type and position of
the standard controls as well as any additional controls.
When you create a custom dialog box template by modifying the default dialog
box template, make sure the identifiers for any added controls are unique and do
not conflict with the identifiers of the standard controls. The following
table lists the name of the default template file and include file for each of the
common dialog box types.
Dialog box type
| Template file
| Include file
| Color
| COLOR.DLG
| COLORDLG.H
| Find
| FINDTEXT.DLG
| DLGS.H
| Font
| FONT.DLG
| DLGS.H
| Open (multiple selection)
| FILEOPEN.DLG
| DLGS.H
| Open (single selection)
| FILEOPEN.DLG
| DLGS.H
| Page Setup
| PRNSETUP.DLG
| DLGS.H
| Print
| PRNSETUP.DLG
| DLGS.H
| Print Setup (obsolete)
| PRNSETUP.DLG
| DLGS.H
| Replace
| FINDTEXT.DLG
| DLGS.H
|
To enable a custom template, you must set a flag in the Flags member of the corresponding structure for the dialog box. If the template is
a resource in an application or dynamic-link library, set an ENABLETEMPLATE
flag in the Flags member, and use the hInstance and lpTemplateName members of the structure to identify the module and resource name. If the
template is already in memory, set an ENABLETEMPLATEHANDLE flag in the Flags member, and use the hInstance member to identify the memory object that contains the template.
In most cases, you must also enable a hook procedure for the dialog box to
support and process input for the additional controls in your custom template.
For the Explorer-style Open and Save As dialog boxes, the default templates
are not available for modification. Instead, your custom template defines a child
dialog box that includes only the items to be added to the standard dialog
box. The custom template can also define a static control that specifies the
location of the cluster of standard controls in the child dialog box. For more
information, see Explorer-Style Custom Templates.
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|