IOleInPlaceObject::SetObjectRects method (oleidl.h)
Specifies how much of the in-place object is to be visible.
Syntax
HRESULT SetObjectRects(
[in] LPCRECT lprcPosRect,
[in] LPCRECT lprcClipRect
);
Parameters
[in] lprcPosRect
A pointer to the RECT structure containing the position of the in-place object using the client coordinates of its parent window.
[in] lprcClipRect
A pointer to the outer rectangle containing the in-place object's position rectangle (lprcPosRect). This rectangle is relative to the client area of the object's parent window.
Return value
This method returns S_OK on success. Other possible return values include the following.
Return code | Description |
---|---|
|
The specified pointer is invalid. |
|
There is insufficient memory available for the operation. |
|
An unexpected error has occurred. |
Remarks
It is possible for lprcClipRect to change without lprcPosRect changing.
The size of an in-place object's rectangle is always calculated in pixels. This is different from other OLE object's visualizations, which are in HIMETRIC.
Notes to Callers
The container should call IOleInPlaceObject::SetObjectRects whenever the window position of the in-place object and/or the visible part of the in-place object changes.Notes to Implementers
The object must size its in-place window to match the intersection of lprcPosRect and lprcClipRect. The object must also draw its contents into the object's in-place window so that proper clipping takes place.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 scaling to the object. The object must then decide whether it should continue the in-place editing in the scale/zoom mode or deactivate.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | oleidl.h |