IOleDocument::EnumViews method (docobj.h)
Creates an object that enumerates the views supported by a document object, or if only one view is supported, returns a pointer to that view.
Syntax
HRESULT EnumViews(
[out] IEnumOleDocumentViews **ppEnum,
[out] IOleDocumentView **ppView
);
Parameters
[out] ppEnum
A pointer to an IEnumOleDocumentViews pointer variable that receives the interface pointer to the enumerator object.
[out] ppView
A pointer to an IOleDocumentView pointer variable that receives the interface pointer to a single view object.
Return value
This method returns S_OK if the object supports multiple views, then ppEnum contains a pointer to the enumerator object, and ppView is NULL. Otherwise, ppEnum is NULL, and ppView contains an interface pointer on the single view.
Other possible return values include the following.
Return code | Description |
---|---|
|
Insufficient memory available for the operation. |
|
The address in ppEnum or ppView is invalid. The caller must pass valid pointers for both arguments. |
Remarks
If a document object supports multiple views of its data, it must also implement IEnumOleDocumentViews and pass that interface's pointer in the out parameter ppEnum. Using this pointer, the container can enumerate the views supported by the document object.
If the document object supports only a single view, IOleDocument::EnumViews passes that view's IOleDocumentView pointer in the out parameter ppView.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | docobj.h |