OFNOTIFYA structure (commdlg.h)

Contains information about a WM_NOTIFY message sent to an OFNHookProc hook procedure for an Open or Save As dialog box. The lParam parameter of the WM_NOTIFY message is a pointer to an OFNOTIFY structure.

Syntax

typedef struct _OFNOTIFYA {
  NMHDR           hdr;
  LPOPENFILENAMEA lpOFN;
  LPSTR           pszFile;
} OFNOTIFYA, *LPOFNOTIFYA;

Members

hdr

Type: NMHDR

The code member of this structure can be one of the following notification messages that identify the message being sent: CDN_FILEOK, CDN_FOLDERCHANGE, CDN_HELP, CDN_INITDONE, CDN_SELCHANGE, CDN_SHAREVIOLATION, CDN_TYPECHANGE.

lpOFN

Type: LPOPENFILENAME

A pointer to the OPENFILENAME structure that was specified when the Open or Save As dialog box was created. For some of the notification messages, this structure contains additional information about the event that caused the notification.

pszFile

Type: LPTSTR

The file name for which a network sharing violation has occurred. This member is valid only with the CDN_SHAREVIOLATION notification message.

Remarks

Not all of the Open and Save As notification messages use the OFNOTIFY structure. The CDN_INCLUDEITEM notification message uses the OFNOTIFYEX structure.

Note

The commdlg.h header defines OFNOTIFY as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header commdlg.h (include Windows.h)

See also

CDN_FILEOK

CDN_FOLDERCHANGE

CDN_HELP

CDN_INITDONE

CDN_SELCHANGE

CDN_SHAREVIOLATION

CDN_TYPECHANGE

Common Dialog Box Library

Conceptual

OFNOTIFYEX

OPENFILENAME

Reference