OLESTATUS OleQueryBounds(lpObject, lpBounds)
LPOLEOBJECT lpObject;
RECT FAR* lpBounds;
The OleQueryBounds function retrieves the extents of the bounding rectangle on the target device for the specified object. The coordinates are in MM_HIMETRIC units.
The OLE libraries express the size of every object in MM_HIMETRIC units. Neither the width nor height of an object should exceed 32,767 MM_HIMETRIC units.
Parameter | Description |
lpObject | Points to the object to query. |
lpBounds | Points to a RECT structure for the extents of the bounding rectangle. The fields of the RECT structure have the following meaning: |
Field | Meaning | |
rect.left | 0 | |
rect.top | 0 | |
rect.right | x-extent | |
rect.bottom | y-extent |
The return value is OLE_OK if successful; otherwise, it could be one of the following:
OLE_ERROR_BLANK
OLE_ERROR_GENERIC
OLE_ERROR_MEMORY
OLE_ERROR_OBJECT
See AlsoOleSetBounds, SetMapMode