Contents Index Topic Contents | ||
Previous Topic: IOleDocumentView::SetRect Next Topic: IOleDocumentView::Show |
IOleDocumentView::SetRectComplex
[input_sync] HRESULT SetRectComplex( LPRECT prcView, LPRECT prcHScroll, LPRECT prcVScroll, LPRECT prcSizeBox );Sets the rectangular coordinates of the view port, horizontal and vertical scroll bars, and the size box.
- Returns one of the following values:
S_OK Success. E_FAIL The method was not successful. E_NOTIMPL The Active Document doesn't support complex rectangles.
- prcView
- [in] Address of a RECT structure containing the coordinates of the view port.
- prcHScroll
- [in] Address of a RECT structure containing the coordinates of the horizontal scroll bar.
- prcVScroll
- [in] Address of a RECT structure containing the coordinates of the vertical scroll bar.
- prcSizeBox
- [in] Address of a RECT structure containing the coordinates of the size box.
View frames that support a workbook metaphor, in which a single document comprises multiple sheets or pages, typically call this method to set the coordinates to be used in common by all the sheets or pages.
Notes to Callers
Calling IOleDocumentView::SetRectComplex is part of the normal activation sequence for Active Documents that support complex rectangles, 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::SetRectComplex or IOleDocumentView::SetRect to tell the view object to resize itself to the new window dimensions.
Notes to Implementers
Active Documents that support complex rectangles mark themselves with DOCMISC_SUPPORTCOMPLEXRECTANGLES, as described in DOCMISC and IOleDocument::GetDocMiscStatus. Active Documents that do not support this method can return E_NOTIMPL.
Upon receiving a call to this method, a view should resize itself to fit the coordinates specified in prcView and fit its scroll bars and size box to the areas described in prcHScroll, prcVScroll, and prcSizeBox.
This method is defined with the [input_sync] attribute, which means that the implementing object cannot yield or make another, non-input_sync RPC call while executing this method.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.