Share via


COleServerItem::OnDraw

Called by the framework to render the OLE item into a metafile.

virtual BOOL OnDraw( 
   CDC* pDC, 
   CSize& rSize  
) = 0;

Parameters

  • pDC
    A pointer to the CDC object on which to draw the item. The display context is automatically connected to the attribute display context so you can call attribute functions, although doing so would make the metafile device-specific.

  • rSize
    Size, in HIMETRIC units, in which to draw the metafile.

Return Value

Nonzero if the item was successfully drawn; otherwise 0.

Remarks

The metafile representation of the OLE item is used to display the item in the container application. If the container application was written with the Microsoft Foundation Class Library, the metafile is used by the Draw member function of the corresponding COleClientItem object. There is no default implementation. You must override this function to draw the item into the device context specified.

Requirements

Header: afxole.h

See Also

Reference

COleServerItem Class

Hierarchy Chart

COleClientItem::Draw

Other Resources

COleServerItem Members