|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| Yes
| Win32s
| Yes
| Import Library
| comdlg32.lib
| Header File
| commdlg.h
| Unicode
| No
| Platform Notes
| None
|
|
|
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 following common
dialog box functions:
DWORD CommDlgExtendedError(VOID)
Parameters
This function has no parameters.
Return Values
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:
Value
| Meaning
| CDERR_DIALOGFAILURE
| The dialog box could not be created. The common dialog box function's call to
the DialogBox function 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_LOADSTRFAILURE
| The common dialog box function failed to load a specified string.
| CDERR_LOCKRESFAILURE
| The common dialog box function failed to lock a specified resource.
| CDERR_MEMALLOCFAILURE
| The common dialog box function was unable to allocate memory for internal
structures.
| CDERR_MEMLOCKFAILURE
| The common dialog box function was unable to lock the memory associated with a
handle.
| CDERR_NOHINSTANCE
| The ENABLETEMPLATE flag was set in the Flags member 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 Flags member 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 Flags member of the initialization structure for the corresponding common dialog
box, but you failed to provide a corresponding template.
| CDERR_REGISTERMSGFAIL
| The RegisterWindowMessage function returned an error code when it was called by the common dialog box
function.
| CDERR_STRUCTSIZE
| The lStructSize member of the initialization structure for the corresponding common dialog
box is invalid.
|
The following error codes can be returned for the PrintDlg function:
Value
| Meaning
| PDERR_CREATEICFAILURE
| The PrintDlg function failed when it attempted to create an information context.
| PDERR_DEFAULTDIFFERENT
| You called the PrintDlg function with the DN_DEFAULTPRN flag specified in the wDefault member of the DEVNAMES structure, but the printer described by the other structure members did not
match the current default printer. (This error occurs when you store the DEVNAMES structure and the user changes the default printer by using the Control
Panel.)
|
| 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 DEVMODE structure, if one exists) with NULL; and call PrintDlg again.
| PDERR_DNDMMISMATCH
| The data in the DEVMODE and DEVNAMES structures describes two different printers.
| PDERR_GETDEVMODEFAIL
| The printer driver failed to initialize a DEVMODE structure. (This error code applies only to printer drivers written for
Windows versions 3.0 and later.)
| PDERR_INITFAILURE
| The PrintDlg function failed during initialization, and there is no more specific extended
error code to describe the failure. This is the generic default error code for
the function.
| PDERR_LOADDRVFAILURE
| The PrintDlg function failed to load the device driver for the specified printer.
| PDERR_NODEFAULTPRN
| A default printer does not exist.
| PDERR_NODEVICES
| No printer drivers were found.
| PDERR_PARSEFAILURE
| The PrintDlg function failed to parse the strings in the [devices] section of the WIN.INI
file.
| PDERR_PRINTERNOTFOUND
| The [devices] section of the WIN.INI file did not contain an entry for the
requested printer.
| PDERR_RETDEFFAILURE
| The PD_RETURNDEFAULT flag was specified in the Flags member of the PRINTDLG structure, but the hDevMode or hDevNames member was not NULL.
| PDERR_SETUPFAILURE
| The PrintDlg function failed to load the required resources.
|
The following error codes can be returned for the ChooseFont function:
Value
| Meaning
| CFERR_MAXLESSTHANMIN
| The size specified in the nSizeMax member of the CHOOSEFONT structure is less than the size specified in the nSizeMin member.
| CFERR_NOFONTS
| No fonts exist.
|
The following error codes can be returned for the GetOpenFileName and GetSaveFileName functions:
Value
| Meaning
| FNERR_BUFFERTOOSMALL
| The buffer pointed to by the lpstrFile member of the OPENFILENAME structure is too small for the filename specified by the user. The first two
bytes of the lpstrFile buffer contain an integer value specifying the size, in bytes (ANSI version)
or characters (Unicode version), required to receive the full name.
| FNERR_INVALIDFILENAME
| A filename is invalid.
| FNERR_SUBCLASSFAILURE
| An attempt to subclass a list box failed because sufficient memory was not
available.
|
The following error code can be returned for the FindText and ReplaceText functions:
Value
| Meaning
| FRERR_BUFFERLENGTHZERO
| A member of the FINDREPLACE structure points to an invalid buffer.
|
See Also
ChooseColor, CHOOSECOLOR, ChooseFont, CHOOSEFONT, DEVMODE, DEVNAMES, DialogBox, FINDREPLACE, FindText, GetOpenFileName, GetSaveFileName, OPENFILENAME, PageSetupDlg, PAGESETUPDLG, PrintDlg, PRINTDLG, RegisterWindowMessage, ReplaceText
| 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
|