Returns the rectangular coordinates of the view port in which the view is to be activated.
HRESULT GetRect(
LPRECT
prcView // Pointer to the current view coordinates
);
Parameters
prcView
[out] Pointer to a RECT structure to which the document view object will write the coordinates of its current view port.
Return Value
S_OK
The view was successfully resized to the rectangle.
E_UNEXPECTED
This view has not yet seen a call to IOleDocumentView::SetRect or IOleDocumentView::SetRectComplex and therefore has no rectangle to return.
Remarks
For an SDI application, the view port is the client area of the frame window minus the space allocated for tool bars, status bar, and such. For an MDI window, the view port is the client area of the MDI document window minus any other frame-level user-interface elements.
The view port coordinates returned by this method are those set in the last previous call to either IOleDocumentView::SetRect or IOleDocumentView::SetRectComplex.
A document view must implement this method completely. Therefore E_NOTIMPL is not an acceptable return value.
See Also
IOleDocumentView::SetRect, IOleDocumentView::SetRectComplex