Partager via


COleClientItem::GetExtent

Call this function to retrieve the OLE item's size.

BOOL GetExtent(
   LPSIZE lpSize,
   DVASPECT nDrawAspect = (DVASPECT
)-1 
);

Parameters

  • lpSize
    Pointer to a SIZE structure or a CSize object that will receive the size information.

  • nDrawAspect
    Specifies the aspect of the OLE item whose bounds are to be retrieved. For possible values, see SetDrawAspect.

Return Value

Nonzero if successful; 0 if the OLE item is blank.

Remarks

If the server application was written using the Microsoft Foundation Class Library, this function causes the OnGetExtent member function of the corresponding COleServerItem object to be called. Note that the retrieved size may differ from the size last set by the SetExtent member function; the size specified by SetExtent is treated as a suggestion. The dimensions are in MM_HIMETRIC units.

Notes

Do not call GetExtent during the processing of an OLE handler, such as OnChange. Call GetCachedExtent instead.

For more information, see IOleObject::GetExtent in the Windows SDK.

Requirements

Header: afxole.h

See Also

Reference

COleClientItem Class

Hierarchy Chart

COleClientItem::SetExtent

COleClientItem::GetCachedExtent

COleServerItem::OnGetExtent

Other Resources

COleClientItem Members