When ever a Window needs to be repainted. OS sendes WM_PAINT mesage to our application. OnPaint handler gets called.
We can also do some painting in OnLButtonDown or other places.
To draw paint in OnPaint we create object of CPaintDC while to paint at other places we create object of CClientDC.
Can any one explain why so?