commdlg.h header

This header is used by Dialog Boxes. For more information, see:

commdlg.h contains the following programming interfaces:

Interfaces

 
IPrintDialogCallback

Provides methods that enable an application to receive notifications and messages from the PrintDlgEx function while the Print Property Sheet is displayed.
IPrintDialogServices

Provides methods that enable an application using the PrintDlgEx function to retrieve information about the currently selected printer.

Functions

 
CDSIZEOF_STRUCT

Gets the size of a struct up to the specified member
CommDlg_OpenSave_GetFilePathA

ASCII version of CommDlg_OpenSave_GetFilePath
CommDlg_OpenSave_GetFilePathW

Wide string version of CommDlg_OpenSave_GetFilePath
CommDlg_OpenSave_GetFolderIDList

Retrieves the address of the item identifier list corresponding to the folder that an Explorer-style Open or Save As dialog box currently has open.
CommDlg_OpenSave_GetFolderPathA

ASCII version of CommDlg_OpenSave_GetFolderPath
CommDlg_OpenSave_GetFolderPathW

Wide string version of CommDlg_OpenSave_GetFolderPath
CommDlg_OpenSave_GetSpecA

ASCII version of CommDlg_OpenSave_GetSpec
CommDlg_OpenSave_GetSpecW

Wide string version of CommDlg_OpenSave_GetSpec
CommDlg_OpenSave_HideControl

Hides the specified control in an Explorer-style Open or Save As dialog box.
CommDlg_OpenSave_SetControlText

Sets the text for the specified control in an Explorer-style Open or Save As dialog box.
CommDlg_OpenSave_SetDefExt

Sets the default file name extension for an Explorer-style Open or Save As dialog box.
CommDlgExtendedError

The CommDlgExtendedError function (commdlg.h) returns a common dialog box error code.
FindTextA

Creates a system-defined modeless Find dialog box that lets the user specify a string to search for and options to use when searching for text in a document. (ANSI)
FindTextW

Creates a system-defined modeless Find dialog box that lets the user specify a string to search for and options to use when searching for text in a document. (Unicode)
GetFileTitleA

Retrieves the name of the specified file. (ANSI)
GetFileTitleW

Retrieves the name of the specified file. (Unicode)
GetOpenFileNameA

Creates an Open dialog box that lets the user specify the drive, directory, and the name of a file or set of files to be opened. (ANSI)
GetOpenFileNameW

Creates an Open dialog box that lets the user specify the drive, directory, and the name of a file or set of files to be opened. (Unicode)
GetSaveFileNameA

Creates a Save dialog box that lets the user specify the drive, directory, and name of a file to save. (ANSI)
GetSaveFileNameW

Creates a Save dialog box that lets the user specify the drive, directory, and name of a file to save. (Unicode)
ReplaceTextA

Creates a system-defined modeless dialog box that lets the user specify a string to search for and a replacement string, as well as options to control the find and replace operations. (ANSI)
ReplaceTextW

Creates a system-defined modeless dialog box that lets the user specify a string to search for and a replacement string, as well as options to control the find and replace operations. (Unicode)

Callback functions

 
ChooseColorA

The CHOOSECOLORA (ANSI) function (commdlg.h) contains information the ChooseColor function uses to initialize the Color dialog box.
ChooseColorW

Wide string version of ChooseColor
ChooseFontA

ASCII version of ChooseFont
ChooseFontW

Wide string version of ChooseFont
LPCCHOOKPROC

Receives messages or notifications intended for the default dialog box procedure of the Color dialog box. This is an application-defined or library-defined callback function that is used with the ChooseColor function.
LPCFHOOKPROC

Receives messages or notifications intended for the default dialog box procedure of the Font dialog box. This is an application-defined or library-defined callback procedure that is used with the ChooseFont function.
LPFRHOOKPROC

Receives messages or notifications intended for the default dialog box procedure of the Find or Replace dialog box.
LPOFNHOOKPROC

Receives notification messages sent from the dialog box.
LPPAGEPAINTHOOK

Receives messages that allow you to customize drawing of the sample page in the Page Setup dialog box. The PagePaintHook hook procedure is an application-defined or library-defined callback function used with the PageSetupDlg function.
LPPAGESETUPHOOK

Receives messages or notifications intended for the default dialog box procedure of the Page Setup dialog box. The PageSetupHook hook procedure is an application-defined or library-defined callback function used with the PageSetupDlg function.
LPPRINTHOOKPROC

Receives messages or notifications intended for the default dialog box procedure of the Print dialog box. This is an application-defined or library-defined callback function that is used with the PrintDlg function.
LPSETUPHOOKPROC

An application-defined or library-defined callback function used with the PrintDlg function. The hook procedure receives messages or notifications intended for the default dialog box procedure of the Print Setup dialog box.
PageSetupDlgA

ASCII version of PageSetupDlg
PageSetupDlgW

Wide string version of PageSetupDlg
PrintDlgA

ASCII version of PrintDlg
PrintDlgExA

ASCII version of PrintDlgEx
PrintDlgExW

Wide string version of PrintDlgEx
PrintDlgW

Wide string version of PrintDlg

Structures

 
CHOOSECOLORA

The CHOOSECOLORA (ANSI) structure (commdlg.h) contains information the ChooseColor function uses to initialize the Color dialog box.
CHOOSECOLORA

The CHOOSECOLORA (ANSI) structure r1 (commdlg.h) contains information the ChooseColor function uses to initialize the Color dialog box.
CHOOSECOLORW

The CHOOSECOLORW (Unicode) structure (commdlg.h) contains information the ChooseColor function uses to initialize the Color dialog box.
CHOOSECOLORW

The CHOOSECOLORW (Unicode) structure r1 (commdlg.h) contains information the ChooseColor function uses to initialize the Color dialog box.
CHOOSEFONTA

Contains information that the ChooseFont function uses to initialize the Font dialog box. After the user closes the dialog box, the system returns information about the user's selection in this structure. (ANSI)
CHOOSEFONTW

Contains information that the ChooseFont function uses to initialize the Font dialog box. After the user closes the dialog box, the system returns information about the user's selection in this structure. (Unicode)
DEVNAMES

Contains strings that identify the driver, device, and output port names for a printer.
FINDREPLACEA

Contains information that the FindText and ReplaceText functions use to initialize the Find and Replace dialog boxes. (ANSI)
FINDREPLACEW

Contains information that the FindText and ReplaceText functions use to initialize the Find and Replace dialog boxes. (Unicode)
OFNOTIFYA

Contains information about a WM_NOTIFY message sent to an OFNHookProc hook procedure for an Open or Save As dialog box. The lParam parameter of the WM_NOTIFY message is a pointer to an OFNOTIFY structure. (ANSI)
OFNOTIFYEXA

Contains information about a CDN_INCLUDEITEM notification message. (ANSI)
OFNOTIFYEXW

Contains information about a CDN_INCLUDEITEM notification message. (Unicode)
OFNOTIFYW

Contains information about a WM_NOTIFY message sent to an OFNHookProc hook procedure for an Open or Save As dialog box. The lParam parameter of the WM_NOTIFY message is a pointer to an OFNOTIFY structure. (Unicode)
OPENFILENAME_NT4A

The OPENFILENAME_NT4 structure is identical to OPENFILENAME with _WIN32_WINNT set to 0x0400. (ANSI)
OPENFILENAME_NT4W

The OPENFILENAME_NT4 structure is identical to OPENFILENAME with _WIN32_WINNT set to 0x0400. (Unicode)
OPENFILENAMEA

Contains information that the GetOpenFileName and GetSaveFileName functions use to initialize an Open or Save As dialog box. After the user closes the dialog box, the system returns information about the user's selection in this structure. (ANSI)
OPENFILENAMEW

Contains information that the GetOpenFileName and GetSaveFileName functions use to initialize an Open or Save As dialog box. After the user closes the dialog box, the system returns information about the user's selection in this structure. (Unicode)
PAGESETUPDLGA

Contains information the PageSetupDlg function uses to initialize the Page Setup dialog box. After the user closes the dialog box, the system returns information about the user-defined page parameters in this structure. (ANSI)
PAGESETUPDLGW

Contains information the PageSetupDlg function uses to initialize the Page Setup dialog box. After the user closes the dialog box, the system returns information about the user-defined page parameters in this structure. (Unicode)
PRINTDLGA

Contains information that the PrintDlg function uses to initialize the Print Dialog Box. After the user closes the dialog box, the system uses this structure to return information about the user's selections. (ANSI)
PRINTDLGEXA

Contains information that the PrintDlgEx function uses to initialize the Print property sheet. After the user closes the property sheet, the system uses this structure to return information about the user's selections. (ANSI)
PRINTDLGEXW

Contains information that the PrintDlgEx function uses to initialize the Print property sheet. After the user closes the property sheet, the system uses this structure to return information about the user's selections. (Unicode)
PRINTDLGW

Contains information that the PrintDlg function uses to initialize the Print Dialog Box. After the user closes the dialog box, the system uses this structure to return information about the user's selections. (Unicode)
PRINTPAGERANGE

Represents a range of pages in a print job. A print job can have more than one page range. This information is supplied in the PRINTDLGEX structure when calling the PrintDlgEx function.