CDM_GETSPEC message
[Starting with Windows Vista, the Open and Save As common dialog boxes have been superseded by the Common Item Dialog. We recommended that you use the Common Item Dialog API instead of these dialog boxes from the Common Dialog Box Library.]
Retrieves the file name (not including the path) of the currently selected file in an Explorer-style Open or Save As dialog box. The dialog box must have been created with the OFN_EXPLORER flag; otherwise, the message fails.
#define WM_USER 0x0400
#define CDM_FIRST (WM_USER + 100)
#define CDM_GETSPEC (CDM_FIRST + 0x0000)
Parameters
-
wParam
-
The size, in characters, of the lParam buffer.
-
lParam
-
A pointer to the buffer that receives the file name.
Return value
If the message succeeds, the return value is the size, in characters, of the file name string, including the terminating NULL character. This is either the number of bytes or characters copied to the buffer, or the required buffer size if the buffer is too small.
If an error occurs, the return value is less than zero.
Remarks
The corresponding macro is as follows:
int CommDlg_OpenSave_GetSpec(hwnd, lparam, wparam);
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
Minimum supported server |
Windows 2000 Server [desktop apps only] |
Header |
|
See also
-
Reference
-
Conceptual