IOleClientSite::OnShowWindow

This method notifies container when an object becomes visible or invisible.

At a Glance

Header file: Oleidl.h
Windows CE versions: 2.0 and later

Syntax

HRESULT OnShowWindow( BOOL fShow );

Parameters

fShow

[in] Boolean value that is set to TRUE if an object’s window is open, or set to FALSE if it is closed.

Return Values

S_OK indicatesthat shading or hatching has been successfully added or removed.

Remarks

An embedded object calls IOleClientSite::OnShowWindow to keep its container informed when the object is open in a window. This window may or may not be currently visible to the end user. The container uses this information to shade the object’s client site when the object is displayed in a window, and to remove the shading when the object is not. A shaded object, having received this notification, knows that it already has an open window and therefore can respond to being double-clicked by bringing this window quickly to the top, instead of launching its application in order to obtain a new one.