Freigeben über


COleServerItem::OnSetExtent

Called by the framework to tell the OLE item how much space is available to it in the container document.

virtual BOOL OnSetExtent(
   DVASPECT nDrawAspect,
   const CSize& size 
);

Parameters

  • nDrawAspect
    Specifies the aspect of the OLE item whose bounds are being specified. This parameter can have any of the following values:

    • DVASPECT_CONTENT   Item is represented in such a way that it can be displayed as an embedded object inside its container.

    • DVASPECT_THUMBNAIL   Item is rendered in a "thumbnail" representation so that it can be displayed in a browsing tool.

    • DVASPECT_ICON   Item is represented by an icon.

    • DVASPECT_DOCPRINT   Item is represented as if it were printed using the Print command from the File menu.

  • size
    A CSize structure specifying the new size of the OLE item.

Return Value

Nonzero if successful; otherwise 0.

Remarks

If the container application was written with the Microsoft Foundation Class Library, this function is called when the SetExtent member function of the corresponding COleClientItem object is called. The default implementation sets the m_sizeExtent member to the specified size if nDrawAspect is DVASPECT_CONTENT; otherwise it returns 0. Override this function to perform special processing when you change the size of the item.

Requirements

Header: afxole.h

See Also

Reference

COleServerItem Class

Hierarchy Chart

COleClientItem::SetExtent

COleServerItem::OnGetExtent

COleServerItem::m_sizeExtent

Other Resources

COleServerItem Members