IShellBrowser::OnViewWindowActive method (shobjidl_core.h)

Called by the Shell view when the view window or one of its child windows gets the focus or becomes active.


HRESULT OnViewWindowActive(
  IShellView *pshv



Type: IShellView*

Address of the view object's IShellView pointer.

Return value


Returns S_OK if successful, or a COM-defined error value otherwise.


The view must pass its IShellView implementation to this routine, although the current version of Windows Explorer does not use this parameter.

Notes to Callers

The Shell view object must call this method before calling the IShellBrowser::InsertMenusSB method. This method will insert a different set of menu items depending on whether the view has the focus.

Notes to Implementers

This method informs the browser that the view is getting the focus (when the mouse is clicked on the view, for example).


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 Shobjidl.h)
DLL Shell32.dll (version 4.0 or later)

See also