在基本對話方塊中添加狀態列

來源:互聯網
上載者:User
在基本對話方塊中添加狀態列      首先我們要在****dlg.h檔案中添加CStatusBar對象m_status     其次,在****dlg.cpp檔案中添加定義狀態列有幾格的數組:             static UINT status_id[]=
               {                     ID_SEPARATOR,
                  ID_SEPARATOR, 
                  ID_INDICATOR_CAPS, 
                  ID_INDICATOR_NUM, 
                  ID_INDICATOR_SCRL     };    定義之後,要在初始化函數中OnInitDialog()添加處理代碼:             if(!this->m_status.Create(this)||                     !this->m_status.SetIndicators(status_id,sizeof(status_id)/sizeof(UINT)))
             {
                    return -1;
              } //此函數判斷狀態列是否建立成功     編寫狀態列的初始化代碼:            UINT nID;           m_status.SetPaneInfo(N,nID,SBPS_STRETCH,70);  //設定狀態條的樣式
            m_status.SetPaneText(N,"Hello!,welcome");   //其中的N,決定於狀態列有幾格

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.