Invalidate();
…………
Ondraw();
是这样吗?
把断点拿到调用的地方来再看看。

解决方案 »

  1.   

    不是这样的,Invalidate()会自动调用OnDraw(),所以不用手动调用OnDraw
      

  2.   

    Because Invalidate() only Invalidates the entire client area of CWnd. The client area is ed for painting when the next WM_PAINT message occurs. As a consequence, OnDraw() will be called after your function calling Invalidate() returns.
        If you'd like to make OnDraw() called at once, you can insert the line below Invalidate():CWnd::UpdateWindow
      

  3.   

    好像发的是WM_PAINT消息,所以会执行OnPaint()函数
      

  4.   

    Invalidate不会自动刷新,它要等待下一次得WM_PAINT,
    所以你要再调用UpdateWindow
    msdn上讲得比较清楚
      

  5.   

    需要在调用Invalidate后调用UpdateWindow(),否则不会马上刷新。
      

  6.   

    其实我想问的是在Invalidate()后,程序会不会一定自动跳到OnDraw里去执行代码
    ,好象对listctrl是不会的.
    不过我还是把分先给大家再说.