展开全部
//////////////////////////////////////////////////////////////////////
static UINT BASED_CODE indicators[] =
{
ID_INDICATOR_CAPS,
ID_SEPARATOR,
ID_INDICATOR_NUM
};
m_StatusBar.CreateEx(this,SBT_TOOLTIPS,WS_CHILD|WS_VISIBLE|CBRS_BOTTOM,AFX_IDW_STATUS_BAR);
m_StatusBar.SetIndicators(indicators,sizeof(indicators)/sizeof(UINT));
m_StatusBar.GetStatusBarCtrl().SetMinHeight(30);
CRect rect;
GetClientRect(&rect);
m_StatusBar.SetPaneInfo(0,ID_INDICATOR_CAPS,SBPS_NORMAL,rect.Width()/3);
m_StatusBar.SetPaneInfo(1,ID_INDICATOR_CAPS,SBPS_NORMAL,rect.Width()/3);
m_StatusBar.SetPaneInfo(2,ID_INDICATOR_NUM,SBPS_STRETCH,rect.Width()/3);
RepositionBars(AFX_IDW_CONTROLBAR_FIRST,AFX_IDW_CONTROLBAR_LAST,ID_INDICATOR_NUM);
m_StatusBar.GetStatusBarCtrl().SetBkColor(RGB(220,220,220));
m_StatusBar.SetPaneText(0,"版权所有:1",TRUE);
m_StatusBar.SetPaneText(1,"版权所有:2",TRUE);
m_StatusBar.SetPaneText(2,"版权所有:3",TRUE);
///////////////////////////////////////////////////////////////////////////////将上述复制到Init函数里,定义 CStatusBar m_StatusBar;// 变量
static UINT BASED_CODE indicators[] =
{
ID_INDICATOR_CAPS,
ID_SEPARATOR,
ID_INDICATOR_NUM
};
m_StatusBar.CreateEx(this,SBT_TOOLTIPS,WS_CHILD|WS_VISIBLE|CBRS_BOTTOM,AFX_IDW_STATUS_BAR);
m_StatusBar.SetIndicators(indicators,sizeof(indicators)/sizeof(UINT));
m_StatusBar.GetStatusBarCtrl().SetMinHeight(30);
CRect rect;
GetClientRect(&rect);
m_StatusBar.SetPaneInfo(0,ID_INDICATOR_CAPS,SBPS_NORMAL,rect.Width()/3);
m_StatusBar.SetPaneInfo(1,ID_INDICATOR_CAPS,SBPS_NORMAL,rect.Width()/3);
m_StatusBar.SetPaneInfo(2,ID_INDICATOR_NUM,SBPS_STRETCH,rect.Width()/3);
RepositionBars(AFX_IDW_CONTROLBAR_FIRST,AFX_IDW_CONTROLBAR_LAST,ID_INDICATOR_NUM);
m_StatusBar.GetStatusBarCtrl().SetBkColor(RGB(220,220,220));
m_StatusBar.SetPaneText(0,"版权所有:1",TRUE);
m_StatusBar.SetPaneText(1,"版权所有:2",TRUE);
m_StatusBar.SetPaneText(2,"版权所有:3",TRUE);
///////////////////////////////////////////////////////////////////////////////将上述复制到Init函数里,定义 CStatusBar m_StatusBar;// 变量
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询