我认为执行OnPaint 函数
onpaint会调用ondraw
///////
CWnd::UpdateWindow  
void UpdateWindow( );ResUpdates the client area by sending aWM_PAINT message if the update region is not empty. The UpdateWindow member function sends a WM_PAINT message directly, bypassing the application queue. If the update region is empty, WM_PAINT is not sent.

解决方案 »

  1.   

    参考:http://www.csdn.net/expert/topicview1.asp
      

  2.   

    先调OnPaint(),以下是MFC的源码,可以看到在OnPaint()里直接调用了OnDraw
    void CView::OnPaint()
    {
    // standard paint routine
    CPaintDC dc(this);
    OnPrepareDC(&dc);
    OnDraw(&dc);
    }
      

  3.   

    View的OnPaint里会调用OnDraw,如果你重载不调,OnDraw就不执行了
      

  4.   

    感谢 chenzhou35(chenzhou35) Belle(不会游泳的鱼....)  Belle(不会游泳的鱼....) 
    的帮助!
      

  5.   


    妹子,有OnDraw消息吗?
    是WM_PAINT,执行OnPaint,OnPaint调用OnDraw