IOleDocumentView::SetRectIOleDocumentView::SetRect*
*Contents  *Index  *Topic Contents
*Previous Topic: IOleDocumentView::SetInPlaceSite
*Next Topic: IOleDocumentView::SetRectComplex

IOleDocumentView::SetRect

[input_sync] HRESULT SetRect(
    LPRECT prcView
   );

Sets the rectangular coordinates of the view port in which a view is to be activated, or resets the coordinates of the view port in which a view is currently activated.

prcView
[in] Address of a RECT structure containing the coordinates of the view port.

For a single document interface (SDI) application, the view port 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 view port is the client area of the MDI document window minus any other frame-level user-interface elements.

Notes to Callers

Calling IOleDocumentView::SetRect or IOleDocumentView::SetRectComplex is part of the normal activation sequence for Active Documents, usually following a call to IOleDocumentView::UIActivate and preceding a call to IOleDocumentView::Show.

Whenever the window used to display an Active Document is resized, the container should call IOleDocumentView::SetRect (or IOleDocumentView::SetRectComplex) to tell the document view object to resize itself to the new window dimensions.

Notes to Implementers

The coordinates of the view port are within the coordinates of the view window, which is obtained through IOleWindow::GetWindow. The view must resize itself to fit the new coordinates passed in the prcView parameter.

This method is defined with the [input_sync] attribute, which means that the view object cannot yield or make another, non-input_sync RPC call while executing this method.

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


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.