Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function returns a common dialog box error value. This value indicates the most recent error to occur during the execution of one of the common dialog box functions.
Syntax
DWORD CommDlgExtendedError() |
Return Value
If the most recent call to a common dialog box function succeeded, the return value is undefined.
If the common dialog box function returned FALSE because the user closed or canceled the dialog box, the return value is zero. Otherwise, the return value is a nonzero error code. For more information, see the following Remarks section.
Remarks
CommDlgExtendedErrorreturns the most recent error to occur during the execution of one of the following common dialog box functions:
The CommDlgExtendedErrorfunction can return general error codes for any of the common dialog box functions. In addition, there are error codes that are returned only for a specific common dialog box. The error codes returned by CommDlgExtendedErrorare defined in the CDERR.H file.
The following general error codes can be returned for any of the common dialog box functions:
- CDERR_DIALOGFAILURE
-
The dialog box could not be created. The common dialog box function's call to the DialogBoxfunction failed. For example, this error occurs if the common dialog box call specifies an invalid window handle.
- CDERR_FINDRESFAILURE
-
The common dialog box function failed to find a specified resource.
- CDERR_INITIALIZATION
-
The common dialog box function failed during initialization. This error often occurs when sufficient memory is not available.
- CDERR_LOADRESFAILURE
-
The common dialog box function failed to load a specified resource.
- CDERR_LOCKRESFAILURE
-
The common dialog box function failed to lock a specified resource.
- CDERR_LOADSTRFAILURE
-
The common dialog box function failed to load a specified string.
- CDERR_MEMALLOCFAILURE
-
The common dialog box function was unable to allocate memory for internal structures.
- CDERR_NOHINSTANCE
-
The ENABLETEMPLATE flag was set in the Flagsmember of the initialization structure for the corresponding common dialog box, but you failed to provide a corresponding instance handle.
- CDERR_NOHOOK
-
The ENABLEHOOK flag was set in the Flagsmember of the initialization structure for the corresponding common dialog box, but you failed to provide a pointer to a corresponding hook procedure.
- CDERR_NOTEMPLATE
-
The ENABLETEMPLATE flag was set in the Flagsmember of the initialization structure for the corresponding common dialog box, but you failed to provide a corresponding template.
- CDERR_REGISTRYFAILURE
-
The common dialog box function was unable to read from registry.
- CDERR_STRUCTSIZE
-
The lStructSizemember of the initialization structure for the corresponding common dialog box is invalid.
The following error codes can be returned for the ChooseFontfunction:
- CFERR_MAXLESSTHANMIN
-
The size specified in the nSizeMaxmember of CHOOSEFONT (structure)is less than the size specified in the nSizeMinmember.
- CFERR_NOFONTS
-
No fonts exist.
Requirements
Header | commctrl.h |
Library | commdlg.lib |
Windows Embedded CE | Windows CE 2.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |