IOleDocumentView::GetRect method

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

Syntax


HRESULT GetRect(
  [out] LPRECT prcView
);

Parameters

prcView [out]

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 codeDescription
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]

Header

DocObj.h

IDL

DocObj.Idl

IID

IID_IOleDocumentView is defined as b722bcc6-4e68-101b-a2bc-00aa00404770

See also

IOleDocumentView
IOleDocumentView::SetRect
IOleDocumentView::SetRectComplex

 

 

Show: