共用方式為


COleControl::OnDraw

Called by the framework to draw the OLE control in the specified bounding rectangle using the specified device context.

virtual void OnDraw(
   CDC* pDC,
   const CRect& rcBounds,
   const CRect& rcInvalid 
);

Parameters

  • pDC
    The device context in which the drawing occurs.

  • rcBounds
    The rectangular area of the control, including the border.

  • rcInvalid
    The rectangular area of the control that is invalid.

Remarks

OnDraw is typically called for screen display, passing a screen device context as pDC. The rcBounds parameter identifies the rectangle in the target device context (relative to its current mapping mode). The rcInvalid parameter is the actual rectangle that is invalid. In some cases this will be a smaller area than rcBounds.

Requirements

Header: afxctl.h

See Also

Reference

COleControl Class

Hierarchy Chart

COleControl::OnDrawMetafile

COleControl::DrawContent

COleControl::DrawMetafile

Other Resources

COleControl Members