IOleDocumentView::GetRect

Obtains the rectangular coordinates of the view port in which the view is or will be activated.

HRESULT GetRect(
  LPRECT prcView  // Pointer to the current view coordinates
);
 

Parameters

prcView
[out] Pointer to a RECT structure to contain the coordinates of the 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 a single document interface (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 a multiple document interface (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 obtained by this method are those set in the most recent call to either IOleDocumentView::SetRect or IOleDocumentView::SetRectComplex.

A document view must implement this method completely; E_NOTIMPL is not an acceptable return value.

QuickInfo

  Windows NT: Use version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in docobj.h.

See Also

IOleDocumentView::SetRect, IOleDocumentView::SetRectComplex