Export (0) Print
Expand All

FILEOKSTRING 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.]

An Open or Save As dialog box sends the FILEOKSTRING registered message to your hook procedure, OFNHookProc, when the user specifies a file name and clicks the OK button. The hook procedure can accept the file name and allow the dialog box to close, or reject the file name and force the dialog box to remain open.


#define FILEOKSTRING TEXT("commdlg_FileNameOK")

Parameters

wParam

This parameter is not used.

lParam

A pointer to an OPENFILENAME structure. The lpstrFile member of this structure contains the drive, path, and file name specified by the user.

Return value

If the hook procedure returns zero, the Open or Save As dialog box accepts the specified file name and closes.

If the hook procedure returns a nonzero value, the Open or Save As dialog box rejects the specified file name and remains open.

Remarks

The hook procedure must specify the FILEOKSTRING constant in a call to the RegisterWindowMessage function to get the identifier for the message sent by the dialog box.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Commdlg.h (include Windows.h)

Unicode and ANSI names

FILEOKSTRINGW (Unicode) and FILEOKSTRINGA (ANSI)

See also

Reference
CDN_FILEOK
OPENFILENAME
RegisterWindowMessage
Conceptual
Common Dialog Box Library

 

 

Community Additions

ADD
Show:
© 2014 Microsoft