我得到了系统时间,并在编辑框输出,但时间不会动,我知道要使它得到TIMER消息,才能不断刷新,请问消息加在什么地方,我用MFC编程

解决方案 »

  1.   

    SetTimer
    然后把你的代码放到ontimer中
      

  2.   

    不断刷新?不断sendMessage
    OnPaint不好吗?
      

  3.   

    SetTimer(1,1000,NULL)OnTimer
      CTime tm=CTime::GetCurrentTime();
    //show time
      

  4.   

    ctrl+w
     Object  ids   父杠,一般是第一个
     Messages    WM_TIMER
      

  5.   

    在你的编辑框的父窗口设置timer,用CWnd::SetTimer设置,然后响应WM_TIMER消息。
      

  6.   

    重载ontimer函数,要不在windowproc里响应WM_TIMER
      

  7.   

    1.SetTimer()设一个1000milliseconds的计时器。
    2.WM_TIMER消息到达时get time赋到编辑框。