Contents Index Topic Contents | ||
Previous Topic: IOleDocumentView::GetRect Next Topic: IOleDocumentView::SaveViewState |
IOleDocumentView::Open
HRESULT Open(Void);Displays the view in a separate pop-up window. The result is similar to calling IOleObject::DoVerb with OLEIVERB_OPEN.
- Returns one of the following values:
S_OK Success. E_FAIL The method was not successful. E_NOTIMPL The Active Document that owns this view does not support separate window activation. E_OUTOFMEMORY There is not enough memory to complete this operation. E_UNEXPECTED The method was called at a time when the view object was not expecting it. A user viewing an Active Document in a container application such as a browser or binder might want to see two or more views or documents at once. Because the browser displays only one view at a time, the container needs a way to ask the other views or documents to display themselves, as required, in separate windows. The IOleDocumentView::Open method provides that way.
Notes to Callers
A successful call to IOleDocumentView::Open should be followed by a call to IOleDocumentView::Show to hide the window or to show the window and bring it to the foreground. While the view is active in its separate window, a container can show or hide the window as many times as it may require.
Notes to Implementers
An Active Document indicates that it does not support activation in a separate window by setting the DOCMISC_CANTOPENEDIT status flag and returning E_NOTIMPL to containers that call this method.
Implementation consists mainly of the view object calling its own IOleInPlaceObject::InPlaceDeactivate method, which leaves the Active Document in a running state but without in-place activation. The Active Document's user interface is not visible until the container calls IOleDocumentView::Show (see "Notes to Callers" above).
See also IOleDocumentView::CloseView, IOleDocumentView::UIActivate, IOleInPlaceSite, IOleInPlaceSite::OnInPlaceActivate
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.