Skip to content

Latest commit

 

History

History
139 lines (107 loc) · 5 KB

nf-oleidl-ioleinplaceobject-setobjectrects.md

File metadata and controls

139 lines (107 loc) · 5 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:oleidl.IOleInPlaceObject.SetObjectRects
IOleInPlaceObject::SetObjectRects (oleidl.h)
Specifies how much of the in-place object is to be visible.
IOleInPlaceObject interface [COM]
SetObjectRects method
IOleInPlaceObject.SetObjectRects
IOleInPlaceObject::SetObjectRects
SetObjectRects
SetObjectRects method [COM]
SetObjectRects method [COM]
IOleInPlaceObject interface
_ole_ioleinplaceobject_setobjectrects
com.ioleinplaceobject_setobjectrects
oleidl/IOleInPlaceObject::SetObjectRects
com\ioleinplaceobject_setobjectrects.htm
com
5ae2e44b-d2e2-4351-b4fa-8c37419a2bcb
12/05/2018
IOleInPlaceObject interface [COM],SetObjectRects method, IOleInPlaceObject.SetObjectRects, IOleInPlaceObject::SetObjectRects, SetObjectRects, SetObjectRects method [COM], SetObjectRects method [COM],IOleInPlaceObject interface, _ole_ioleinplaceobject_setobjectrects, com.ioleinplaceobject_setobjectrects, oleidl/IOleInPlaceObject::SetObjectRects
oleidl.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
OleIdl.Idl
Windows
19H1
IOleInPlaceObject::SetObjectRects
oleidl/IOleInPlaceObject::SetObjectRects
c++
APIRef
kbSyntax
COM
OleIdl.h
IOleInPlaceObject.SetObjectRects

IOleInPlaceObject::SetObjectRects

-description

Specifies how much of the in-place object is to be visible.

-parameters

-param lprcPosRect [in]

A pointer to the RECT structure containing the position of the in-place object using the client coordinates of its parent window.

-param lprcClipRect [in]

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.

-returns

This method returns S_OK on success. Other possible return values include the following.

Return code Description
E_INVALIDARG
The specified pointer is invalid.
E_OUTOFMEMORY
There is insufficient memory available for the operation.
E_UNEXPECTED
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.

Note  While executing IOleInPlaceObject::SetObjectRects, do not make calls to the PeekMessage or GetMessage functions, or a dialog box. Doing so may cause the system to deadlock. There are further restrictions on which OLE interface methods and functions can be called from within IOleInPlaceObject::SetObjectRects.
 

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.

-see-also

GetMessage

IOleInPlaceObject

IOleInPlaceSite::OnPosRectChange

PeekMessage