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.
- Returns one of the following values:
S_OK Success. E_FAIL The method was not successful. E_OUTOFMEMORY There was not enough memory to complete this operation. E_UNEXPECTED The method was called at an unexpected time. This is most likely due to the fact that the view object was not properly initialized before the Show method was called.
- 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.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.