IOleDocumentView::ShowIOleDocumentView::Show*
*Contents  *Index  *Topic Contents
*Previous Topic: IOleDocumentView::SetRectComplex
*Next Topic: IOleDocumentView::UIActivate

IOleDocumentView::Show

HRESULT Show(
    BOOL fShow
   );

Requests a view to show or hide itself, activating or deactivating itself as necessary.

fShow
[in] If nonzero, the view is to in-place activate itself if necessary and show itself. If zero, the view is to UI-deactivate itself if necessary and hide itself.

Calling IOleDocumentView::Show is the last step in the activation sequence; before showing itself an Active Document must know exactly what space it occupies and have all its tools available.

Notes to Callers

A call to this method for the purpose of activating a view should follow calls to IOleDocumentView::SetInPlaceSite, IOleDocumentView::UIActivate, and IOleDocumentView::SetRect (or IOleDocumentView::SetRectComplex).

Notes to Implementers

Implementations of this method should embody the following pseudo-code.

if (fShow)
    {
    if(!fInPlaceActive)
        {
        //In-place activate the view but do not UI activate it.
        }
    
    //Show the view window. 
    }
else
    {
    if(fUIActive)
        {
        //UI-deactivate the view.
        }
    
    //Hide the view window.
    }

All views of an Active Document must at least support in-place activation; E_NOTIMPL is not an acceptable return value.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.