This documentation is archived and is not being maintained.


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

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



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.


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

Nonzero if the item was successfully drawn; otherwise 0.

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.