建议你用定时器吧,你机器的速度使你根本无法看到变化SetTimer()响应ON_TIMER

解决方案 »

  1.   

    void CFindDlg::OnButton1() 
    {
    for(int st=0;st<=100000;st++)
       {
    m_edit1=st;
    Sleep(1000);
    UpdateData(FALSE);
       }
    }
      

  2.   

    windows没有那么傻
    他会把一堆WM_PAINT消息变成一个的
      

  3.   

    SetTimer()
    或你按下button后起一个线程
    不断刷新edit
      

  4.   


      void CFindDlg::OnButton1() 
    {
    for(int st=0;st<=100000;st++)
       {
    m_edit1=st;
    UpdateData(FALSE);  
    while(::PeekMessage(&Msg,this->m_hWnd,NULL,NULL,PM_NOREMOVE))
    {
        ::GetMessage(&Msg,this->m_hWnd,NULL,NULL);
        ::TranslateMessage(&Msg);
        ::DispatchMessage(&Msg);
    }
    Sleep(1000);
       }