COleClientItem::SetItemRects

Call this function to set the bounding rectangle or the visible rectangle of the OLE item.

BOOL SetItemRects( 
   LPCRECT lpPosRect = NULL, 
   LPCRECT lpClipRect = NULL  
);

Parameters

  • lprcPosRect
    Pointer to the rectangle containing the bounds of the OLE item relative to its parent window, in client coordinates.

  • lprcClipRect
    Pointer to the rectangle containing the bounds of the visible portion of the OLE item relative to its parent window, in client coordinates.

Return Value

Nonzero if successful; otherwise, 0.

Remarks

This function is called by the default implementation of the OnChangeItemPosition member function. You should call this function whenever the position or visible portion of the OLE item changes. Usually this means that you call it from your view's OnSize and OnScrollBy member functions.

For more information, see IOleInPlaceObject::SetObjectRects in the Windows SDK.

Requirements

Header: afxole.h

See Also

Reference

COleClientItem Class

Hierarchy Chart

COleClientItem::OnChangeItemPosition

COleClientItem::OnGetItemPosition

Other Resources

COleClientItem Members