Contents Index Topic Contents | ||
Previous Topic: IOleDocument Next Topic: IOleDocument::EnumViews |
IOleDocument::CreateView
HRESULT CreateView( IOleInPlaceSite *pIPSite, IStream *pstm, DWORD dwReserved, IOleDocumentView **ppView );Creates a document view object in the caller's process and obtains a pointer to that object's IOleDocumentView interface.
- Returns one of the following values:
S_OK Success. E_FAIL The view object creation failed. E_OUTOFMEMORY There is not enough memory to create the view object. E_POINTER The address in ppView is NULL. E_UNEXPECTED The method was called at a time when the object was not expecting it.
- pIPSite
- [in] Address of the view site object to be associated with the new document view object. Can be NULL, as when the view is contained in a new, uninitialized Active Document, in which case the caller must initialize the view with a subsequent call to the IOleDocumentView::SetInPlaceSite method.
- pstm
- [in] Address of a stream containing data from which the new document view object should initialize itself. If NULL, the Active Document initializes the new document view object with a default state.
- dwReserved
- [in] Reserved for future use. Must be zero.
- ppView
- [out] Address of the IOleDocumentView interface pointer on the new document view object. If IOleDocument::CreateView succeeds, the caller is responsible for calling IUnknown::Release on this pointer when the view object is no longer needed.
See also IOleDocumentSite::ActivateMe, IOleDocumentView::ApplyViewState, IOleDocumentView::Show, IOleDocumentView::UIActivate
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.