1个回答
展开全部
1.添加成员变量CStatusBarCtrl m_StatusBar;
2.在OnInitDialog()中加入:
m_StatusBar.Create(WS_CHILD|WS_VISIBLE|SBT_OWNERDRAW, CRect(0,0,0,0), this, 0);
int strPartDim[3]= {100, 200, -1}; //分割数量
m_StatusBar.SetParts(3, strPartDim);
//设置状态栏文本
m_StatusBar.SetText("分栏一", 0, 0);
m_StatusBar.SetText("分栏二", 1, 0);
m_StatusBar.SetText("分栏三", 2, 0);
//下面是在状态栏中加入图标
m_StatusBar.SetIcon(1,
SetIcon(AfxGetApp()->LoadIcon(IDR_MAINFRAME),
FALSE));//为第二个分栏中加的图标
2.在OnInitDialog()中加入:
m_StatusBar.Create(WS_CHILD|WS_VISIBLE|SBT_OWNERDRAW, CRect(0,0,0,0), this, 0);
int strPartDim[3]= {100, 200, -1}; //分割数量
m_StatusBar.SetParts(3, strPartDim);
//设置状态栏文本
m_StatusBar.SetText("分栏一", 0, 0);
m_StatusBar.SetText("分栏二", 1, 0);
m_StatusBar.SetText("分栏三", 2, 0);
//下面是在状态栏中加入图标
m_StatusBar.SetIcon(1,
SetIcon(AfxGetApp()->LoadIcon(IDR_MAINFRAME),
FALSE));//为第二个分栏中加的图标
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询