Framework uses OnDraw() code for WM_PAINT processing and for printing document as well. So you provide universal code for both tasks.
In addition to that, there are other differences:
WM_PAINT is a Windows message which is sent to every window in order to have it repainted. With MFC, OnPaint() is just a handler for that message. In response to a WM_PAINT message, your code must call BeginPaint() to obtain a DC, do the drawing, and call EndPaint(). MFC apps can instantiate a CPaintDC in OnPaint(), it wraps the calls to BeginPaint() and EndPaint().
OTOH, OnDraw() is part of the doc/view architecture. It only exists for CView and derived classes. Basically, CView's OnPaint handler instantiates the CPaintDC for you and calls OnDraw() passing in the DC as the pDC param, so you just have to add the drawing code. Furthermore, as Igor already said, it is also called in response to WM_PRINT messages, so you can use the same drawing code for screen and printer output.
In addition to that, there are other differences:
WM_PAINT is a Windows message which is sent to every window in order to have it repainted. With MFC, OnPaint() is just a handler for that message. In response to a WM_PAINT message, your code must call BeginPaint() to obtain a DC, do the drawing, and call EndPaint(). MFC apps can instantiate a CPaintDC in OnPaint(), it wraps the calls to BeginPaint() and EndPaint().
OTOH, OnDraw() is part of the doc/view architecture. It only exists for CView and derived classes. Basically, CView's OnPaint handler instantiates the CPaintDC for you and calls OnDraw() passing in the DC as the pDC param, so you just have to add the drawing code. Furthermore, as Igor already said, it is also called in response to WM_PRINT messages, so you can use the same drawing code for screen and printer output.