windows_programming_notes.nbk: Home | Index | Next Page: Context menu on the fly | Previous Page: CommandLineToArgvW


 CommDlgExtendedError

The CommDlgExtendedError function returns a common dialog box error code. This code indicates the most recent error to occur during the execution of one of the common dialog box functions. These error codes are defined in Cderr.h.

Syntax

    DWORD CommDlgExtendedError(VOID);

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

The CommDlgExtendedError function 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 CommDlgExtendedError are defined in the Cderr.h file.

The following general error codes can be returned for any of the common dialog box functions.

The following error codes can be returned for the PrintDlg function.

To use the printer described by the DEVNAMES structure, clear the DN_DEFAULTPRN flag and call PrintDlg again.

To use the default printer, replace the DEVNAMES structure (and the structure, if one exists) with NULL; and call PrintDlg again.

The following error codes can be returned for the ChooseFont function.

The following error codes can be returned for the GetOpenFileName and GetSaveFileName functions.

The following error code can be returned for the FindText and ReplaceText functions.

Function Information


windows_programming_notes.nbk: Home | Index | Next Page: Context menu on the fly | Previous Page: CommandLineToArgvW


Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time