• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            為生存而奔跑

               :: 首頁(yè) :: 聯(lián)系 :: 聚合  :: 管理
              271 Posts :: 0 Stories :: 58 Comments :: 0 Trackbacks

            留言簿(5)

            我參與的團(tuán)隊(duì)

            搜索

            •  

            積分與排名

            • 積分 - 328483
            • 排名 - 74

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            Here is how to add the current time to your status bar...

            Step 1:

            Derive a CMyStatusBar class from CStatusBar as follows:
            //MyStatusBar.h:
            //==============
            class CMyStatusBar : public CStatusBar {
            DECLARE_DYNCREATE(CMyStatusBar)
            public:
            CMyStatusBar();
            ~CMyStatusBar();
            private:
            CString m_strClockFormat;
            public:
            void SetClockFormat(LPCTSTR strClockFormat);
            // Overrides
            // ClassWizard generated virtual function overrides
            //{{AFX_VIRTUAL(CMyStatusBar)
            //}}AFX_VIRTUAL
            // Generated message map functions
            //{{AFX_MSG(CMyStatusBar)
            afx_msg void OnDestroy();
            afx_msg void OnUpdateIndicatorTime(CCmdUI* pCmdUI);
            afx_msg int OnCreate( LPCREATESTRUCT lpCreateStruct );
            //}}AFX_MSG
            DECLARE_MESSAGE_MAP()
            };
            /////////////////////////////////////////////////////////////////
            //MyStatusBar.cpp:
            //==============
            #include "stdafx.h"
            #include "MyStatusBar.h"
            #include "Resource.h"
            #ifdef _DEBUG
            #undef THIS_FILE
            static char BASED_CODE THIS_FILE[] = __FILE__;
            #endif
            IMPLEMENT_DYNCREATE(CMyStatusBar, CStatusBar)
            BEGIN_MESSAGE_MAP(CMyStatusBar, CStatusBar)
            ON_WM_CREATE()
            ON_WM_DESTROY()
            ON_UPDATE_COMMAND_UI(ID_INDICATOR_TIME, OnUpdateIndicatorTime)
            END_MESSAGE_MAP()
            CMyStatusBar::CMyStatusBar()
            : CStatusBar()
            , m_strClockFormat("%H:%M:%S")
            {
            }
            CMyStatusBar::~CMyStatusBar() {
            }
            void CMyStatusBar::SetClockFormat(LPCTSTR strClockFormat) {
            m_strClockFormat = strClockFormat;
            }
            int CMyStatusBar::OnCreate(LPCREATESTRUCT lpCreateStruct) {
            // make sure time gets updated every second, even when idle
            CStatusBar::OnCreate(lpCreateStruct);
            SetTimer(ID_INDICATOR_TIME,1000,NULL);
            return 0;
            }
            void CMyStatusBar::OnUpdateIndicatorTime(CCmdUI* pCmdUI) {
            pCmdUI->Enable(true);
            pCmdUI->SetText(CTime::GetCurrentTime().Format(m_strClockFormat));
            }
            void CMyStatusBar::OnDestroy() {
            KillTimer(ID_INDICATOR_TIME);
            ProgressDestroy();
            CStatusBar::OnDestroy();
            }
            Step 2:

            添加一個(gè)字符串資源,ID是ID_INDICATOR_TIME,值為HH:MM:SS


            Step 3:

            Add a new indicator pane called ID_INDICATOR_TIME to your list of indicator in your mainframe eg. this is my indicator list...
            static const UINT indicators[] = {
            ID_SEPARATOR,           // status line indicator
            ID_INDICATOR_CAPS,
            ID_INDICATOR_NUM,
            ID_INDICATOR_SCRL,
            ID_INDICATOR_TIME,  // <-- new indicator pane
            };
            

            Step 4:

            Replace all existing uses of CStatusBar in your app with CMyStatusBar - in particular, the member variable in your mainframe m_wndStatusBar;
            posted on 2009-07-24 10:35 baby-fly 閱讀(313) 評(píng)論(0)  編輯 收藏 引用 所屬分類(lèi): MFC
            2021久久精品国产99国产精品| 亚洲国产精品无码久久九九| 热综合一本伊人久久精品| 久久99国产乱子伦精品免费| 99久久综合国产精品免费| 国产精品日韩欧美久久综合| 久久久青草久久久青草| 久久综合丁香激情久久| 国产午夜精品理论片久久影视| 色婷婷综合久久久中文字幕 | 99久久免费国产精品| 国产精品九九九久久九九| 国内精品人妻无码久久久影院| 久久久久99精品成人片试看 | 久久九九精品99国产精品| 久久免费的精品国产V∧| 久久Av无码精品人妻系列| 国产精品久久久久久一区二区三区| 欧洲人妻丰满av无码久久不卡| 久久综合给合久久狠狠狠97色| 久久不见久久见免费视频7| 青青青青久久精品国产| 久久人人爽人人爽人人片AV麻豆| 久久久久亚洲精品中文字幕| 亚洲日韩欧美一区久久久久我| 2019久久久高清456| 狠狠干狠狠久久| 亚洲午夜久久久| 潮喷大喷水系列无码久久精品| 国产精品久久久久久久久久免费| 一级a性色生活片久久无少妇一级婬片免费放 | 国产精品久久婷婷六月丁香| 色欲av伊人久久大香线蕉影院 | 精品久久人人做人人爽综合 | 亚洲午夜久久久久久久久电影网| 久久综合给久久狠狠97色| 久久国产精品免费一区二区三区| 久久精品国产男包| 国产免费久久精品丫丫| 人妻无码αv中文字幕久久| 久久se精品一区二区影院|