ICommDlgBrowser::OnStateChange method (shobjidl_core.h)

Called after a state, identified by the uChange parameter, has changed in the IShellView interface.

Syntax

HRESULT OnStateChange(
  IShellView *ppshv,
  ULONG      uChange
);

Parameters

ppshv

Type: IShellView*

A pointer to the view's IShellView interface.

uChange

Type: ULONG

Change in the selection state. This parameter can be one of the following values.

CDBOSC_SETFOCUS

The focus has been set to the view.

CDBOSC_KILLFOCUS

The view has lost the focus.

CDBOSC_SELCHANGE

The selection has changed.

CDBOSC_RENAME

An item has been renamed.

CDBOSC_STATECHANGE

An item has been checked or unchecked.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This method is used to let the common file dialog boxes track the state of the view and change its user interface as needed.

Note to Calling Applications

When items in the view are selected, or when the view loses the focus, it needs to call this method to notify the common dialog that either the view state or selection state is changing.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shlobj.h)
DLL Shell32.dll (version 4.0 or later)

See also

ICommDlgBrowser