Contents Previous Page Next Page
IOleDocumentView::SetRectComplex

Sets the rectangular coordinates of the view port, horizontal and vertical scroll bars, and the size box.

[input_sync] HRESULT SetRectComplex(

    LPRECT
 prcView,             // Pointer to coordinates of view port                   
                                                                                         
    LPRECT prcHScroll,          // Pointer to coordinates of horizontal scroll bar       
                                                                                         
    LPRECT prcVScroll,          // Pointer to coordinates of vertical scroll bar         
                                                                                         
    LPRECT prcSizeBox           // Pointer to coordinates of size box                    
                                                                                         
   );                                                                                    
                                                                                         

Parameters

prcView

[in] Pointer to a RECT structure containing the coordinates of the view port.

prcHScroll

[in] Pointer to a RECT structure containing the coordinates of the horizontal scroll bar.

prcVScroll

[in] Pointer to a RECT structure containing the coordinates of the vertical scroll bar.

prcSizeBox

[in] Pointer to a RECT structure containing the coordinates of the size box.

Return Value

S_OK

The view was successfully resized to the rectangle.

E_NOTIMPL

The document object that owns this view does not support complex rectangles.

E_FAIL

Some other critical error occurred that prevented resizing the view or placing the scrollbars and size box.

Remarks

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 sequece for document objects that support complex rectangles, usually following a call to IOleDocumentView::UIActivate and preceding a call to IOleDocumentView::Show. In addition, whenever the window used to display a document object is resized, the container should call SetRectComplex (or IOleDocumentView::SetRect) to tell the document object to resize itself to fit the new window dimensions.

Notes to Implementers

Document objects that support complex rectangles mark themselves with DOCMISC_SUPPORTCOMPLEXRECTANGLES, as described in DOCMISC and IOleDocument::GetDocMiscStatus. Document objects 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 scrollbars 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.

See Also

DOCMISC , IOleDocument::GetDocMiscStatus