OLESTATUS OleSetBounds(lpObject, lpBounds) | |||||
LPOLEOBJECT lpObject; | /* pointer to object | */ | |||
const RECT FAR* lpBounds; | /* address of struct for bounding rectangle | */ |
The OleSetBounds function sets the coordinates of the bounding rectangle for the specified object on the target device.
lpObject
Points to the object for which the bounding rectangle is set.
lpBounds
Points to a RECT structure containing the coordinates of the bounding rectangle. The coordinates are specified in MM_HIMETRIC units.
The return value is OLE_OK if the function is successful. Otherwise, it is an error value, which can be one of the following:
OLE_BUSY
OLE_ERROR_MEMORY
OLE_ERROR_OBJECT
OLE_WAIT_FOR_RELEASE
The OleSetBounds function is ignored for linked objects, because their size is determined by the source document for the link.
The bounding rectangle specified in the OleSetBounds function does not necessarily have the same dimensions as the rectangle specified in the call to the OleDraw function. These dimensions may be different because of the view scaling used by the container application. An application can use OleSetBounds to cause the server to reformat the picture to fit the rectangle more closely.
In the MM_HIMETRIC mapping mode, the positive y direction is up.
OleDraw, OleQueryBounds, SetMapMode