当前位置:首页 » 多媒体相关

??在程序的状态栏里动态显示系统时间


我刚学vc不久,做一课题,要求在状态栏里动态显示系统时间,象有一个小钟是的,各位有明白的,帮帮忙好吗?

推荐阅读

  • CPL地图详解:ClanMill—实用技巧 [详细内容]
  • 关注E系统奥林巴斯将发布E-5/E-3! [详细内容]
  • 三防剑客 奥林巴斯μ725SW跌破2500奥林巴斯 OLYMPUS μ-725SW2000-3000元 [详细内容]
  • 18则你不知道的QQ技巧 [详细内容]
  • 买手机的一些建议 [详细内容]
  • 索尼即将发布 世界最小AVCHD高清DV8000元以上 [详细内容]
  • NOKIA 6500手机使用小技巧 [详细内容]
  • 网友回答:
    网友:forfar

    设个定时器,每隔1秒,更新一次。

    网友:he_zhidan

    在状态栏的最左边显示时间  
      static   uint   indicators[]   =  
      {  
                      id_separator,//我们增加的  
      id_separator,                        
      id_indicator_caps,  
      id_indicator_num,  
      id_indicator_scrl,  
      };  
       
      int   cmainframe::oncreate(lpcreatestruct    
       
      lpcreatestruct)  
      {  
                  .....  
       
      m_wndstatusbar.setpaneinfo(1,id_separtor,sbps_normal,6  
       
      0);  
      }  
       
      //菜单的响应函数  
      void   cmainframe::ontest()    
      {  
              ctime   t;  
      t   =   ctime::getcurrenttime();  
      cstring   str   =   t.format("%h   -   %m     -%s");  
      m_wndstatusbar.setpanetext(0,str);  
       
      }  
      我试了  
      可以  
      不行请给我发短消息

    网友:bcpl

    http://www.ccw.com.cn/htm/produ/special/vc/jiqiao/01_9_12_9.asp

    网友:he_zhidan

    加一个成员变量   uint   m_timer;  
      oncreate中  
      m_timer   =   settimer(1,1000,null);  
       
      void   cmainframe::ontimer(uint   nidevent)    
      {  
              ontest();  
            cframewnd::ontimer(nidevent);  
      }  
       
      cmainframe::~cmainframe()  
      {  
      killtimer(m_timer);  
      }

    .

    讨论区

    Login