Notifies the container that the object extents have changed.
Syntax
HRESULT OnPosRectChange(
[in] LPCRECT lprcPosRect
);
Parameters
- lprcPosRect [in]
-
A pointer a RECT structure that contains the position of the in-place object in the client coordinates of its parent window.
Return Value
This method returns S_OK on success. Other possible return values include the following.
| Return code | Description |
- E_INVALIDARG
| The supplied pointer is invalid.
|
- E_UNEXPECTED
| An unexpected error occurred.
|
Remarks
Notes to Callers
The OnPosRectChange method is called by the in-place object.
Notes to Implementers
When the in-place object calls OnPosRectChange, the container must call IOleInPlaceObject::SetObjectRects to specify the new position of the in-place window and the clipping rectangle. Only then does the object resize its window.
In most cases, the object grows to the right and/or down. There could be cases where the object grows to the left and/or up, as conveyed through lprcPosRect. It is also possible to change the object's position without changing its size.
Requirements
| Minimum supported client | Windows 2000 Professional |
| Minimum supported server | Windows 2000 Server |
| Header | OleIdl.h |
| IDL | OleIdl.Idl |
| IID | IID_IOleInPlaceSite is defined as 00000119-0000-0000-C000-000000000046 |
See Also
- IOleInPlaceSite
- IOleInPlaceObject::SetObjectRects
Send comments about this topic to Microsoft
Build date: 11/12/2009