IOleDocumentView::GetRect method (docobj.h)

Retrieves the rectangular coordinates of the viewport in which the view is or will be activated.

Syntax

HRESULT GetRect(
  [out] LPRECT prcView
);

Parameters

[out] prcView

A pointer to a RECT structure to contain the coordinates of the current viewport set with IOleDocumentView::SetRect.

Return value

This method returns S_OK on success. Other possible return values include the following.

Return code Description
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 viewport is the client area of the frame window minus the space allocated for toolbars, status bar, and such. For a multiple document interface (MDI) window, the viewport is the client area of the MDI document window minus any other frame-level user-interface elements.

The viewport 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.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header docobj.h

See also

IOleDocumentView

IOleDocumentView::SetRect

IOleDocumentView::SetRectComplex