|
IOleInPlaceObject::SetObjectRects
Indicates how much of the in-place object is visible.
HRESULT SetObjectRects(
LPCRECT lprcPosRect,
| //The position of the in-place object
| LPCRECT lprcClipRect
| //The outer rectangle containing the in-place object's position rectangle
| );
|
|
Parameters
lprcPosRect
[in] Points to the rectangle containing the position of the in-place object
using the client coordinates of its parent window.
lprcClipRect
[in] Points to the outer rectangle containing the in-place object's position
rectangle (PosRect). This rectangle is relative to the client area of the object's parent window.
Return Values
S_OK
The operation successfully indicated the rectangle.
E_INVALIDARG
One or more arguments are invalid.
E_OUTOFMEMORY
Out of memory.
E_UNEXPECTED
An unexpected error occurred.
Comments
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 Windows PeekMessage or GetMessage functions, or a dialog box. Doing so may cause the system to deadlock. There
are further restrictions on which OLE interface mehtods and functions can be
called form within 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 Implementors
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
IOleInPlaceSite::OnPosRectChange
PeekMessage, GetMessage in Win32
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|