IOleDocumentView::Show method
Activates or deactivates a view.
Syntax
HRESULT Show(
[in] BOOL fShow
);
Parameters
- fShow [in]
-
If TRUE, the view is to show itself. If FALSE, the view is to hide itself.
Return value
This method returns S_OK on success. Other possible return values include the following.
| Return code | Description |
|---|---|
|
The operation failed. |
|
Insufficient memory available for operation. |
|
An unexpected error occurred. |
Remarks
Calling Show is the last step in the activation sequence, because before showing itself a document object 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 pseudocode.
if (fShow)
{
In-place activate the view but do not UI activate it.
Show the view window.
}
else
{
Call IOleDocumentView::UIActivate(FALSE) on this view
Hide the view window
}
All views of a document object must at least support in-place activation; E_NOTIMPL is not an acceptable value.
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
IDL |
|
|
IID |
IID_IOleDocumentView is defined as b722bcc6-4e68-101b-a2bc-00aa00404770 |
See also
- IOleDocumentView
- IOleDocumentView::SetInPlaceSite
- IOleDocumentView::SetRect
- IOleDocumentView::SetRectComplex
- IOleDocumentView::UIActivate