The information in this article applies to:
SYMPTOMSCalling COleClientItem::SetItemRects() causes the server to change its zoom-factor. RESOLUTIONIn some cases, you may find it advantageous to have a container change the area provided to an in-place active object without changing the zoom factor of the object. To do this, have the container first set the object's extents by calling COleClientItem::SetExtent and then set the in-place item's window size by calling COleClientItem::SetItemRects. STATUSThis behavior is by design. MORE INFORMATIONCOleClientItem::SetItemRects() calls IOleInPlaceObject::SetObjectRects() and passes its parameters. The following is the description of IOleInPlaceObject::SetObjectRects() in Volume 2 of the OLE2 Programmer's Reference: The object should compare its width and height with those provided by its container (conveyed through lprcPosRect). If the comparison does not result in a match, the container is applying either scaling or zooming to the object. The object must then decide whether it should continue the in-place editing in the scale/zoom mode or deactivate."The object's width and height are determined by the extent information passed to it via COleClientItem::SetExtent() -- which calls IOleObject::SetExtent on the in-place object). Therefore if you want the client application to change the rectangle used by an in-place active object, have it first set the extent of the object in HIMETRIC units to the size of the new rectangle and then set the rectangle. The following sample code demonstrates this technique. It assumes that CMyClientItem is derived from COleClientItem and that rect has coordinates specified with respect to the view which contains the object. It returns true if SetItemRects was successful. Sample Code
Additional query words: 1.00 1.50 2.00 2.10 2.50 2.51 3.00 3.10 scale zoom size ole
Keywords : |
Last Reviewed: February 2, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |