如何在对话框中加入状态栏[1]
welcome to http://bccv.songstech.com/
1.ID_INDICATOR_NISH and ID_INDICATOR_TIME这个两个加到 symbol 里去,同样的加到 string table 里去
2.在你的 Dialog 类里面加个 CStatusBar m_bar;
3.在实现文件开头加上
static UINT BASED_CODE indicators[] =
{
ID_INDICATOR_NISH,
ID_INDICATOR_TIME
};
4.OnInitDialog 里面加上
m_bar.Create(this); //We create the status bar m_bar.SetIndicators(indicators,2); //Set the number of panes CRect rect; GetClientRect(&rect); //Size the two panes m_bar.SetPaneInfo(0,ID_INDICATOR_NISH, SBPS_NORMAL,rect.Width()-100); m_bar.SetPaneInfo(1,ID_INDICATOR_TIME,SBPS_STRETCH ,0); //This is where we actually draw it on the screen RepositionBars(AFX_IDW_CONTROLBAR_FIRST,AFX_IDW_CONTROLBAR_LAST, ID_INDICATOR_TIME);
okay了
注:转载文章需注明来源:VCer.net 文章地址:http://vcer.net/1076417661366.html
如果你觉得VCer.net不错,而且你愿意为VCer.net捐赠一元钱,那么点击后面的捐赠按钮吧:)
A B C D E