Rediger

Del via


CDN_INCLUDEITEM notification code

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

Sent by an Open or Save As dialog box to determine whether the dialog box should display an item in a shell folder's item list. When the user opens a folder, the dialog box sends a CDN_INCLUDEITEM notification for each item in the folder. The dialog box sends this notification only if the OFN_ENABLEINCLUDENOTIFY flag was set when the dialog box was created.

Your OFNHookProc hook procedure receives this message in the form of a WM_NOTIFY message.

#define CDN_FIRST               (0U-601U)
#define CDN_INCLUDEITEM         (CDN_FIRST - 0x0007)

Parameters

wParam

This parameter is not used.

lParam

A pointer to an OFNOTIFYEX structure.

The OFNOTIFYEX structure contains an NMHDR structure whose code member indicates the CDN_INCLUDEITEM notification message.

The psf member of the OFNOTIFYEX structure is a pointer to an interface for the folder whose items are being enumerated. The pidl member is a pointer to an item identifier list that identifies the item relative to the folder.

Return value

If the OFNHookProc hook procedure returns zero, the dialog box excludes the item from the list of items.

To include the item, return a nonzero value from the hook procedure.

Remarks

The dialog box always includes items that have both the SFGAO_FILESYSTEM and SFGAO_FILESYSANCESTOR attributes, regardless of the value returned by CDN_INCLUDEITEM.

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

Reference

GetOpenFileName

GetSaveFileName

OFNHookProc

OFNOTIFYEX

Conceptual

Common Dialog Box Library