We should use OnDraw if the window is derived from CView, otherwise OnPaint.
OnDraw()
|
OnPaint()
|
A member function of CView.
OnDraw is a virtual function.
OnPaint handler for views call a virtual function OnDraw.
CView::OnDraw
virtual void OnDraw(
CDC* pDC
) = 0
pDC
Points to the device context to be used for rendering an image of the document.
|
A member function of CWnd.
OnPaint is a WM_PAINT message handler.
CWnd::OnPaint
afx_msg void OnPaint( );
|
No comments:
Post a Comment