15,980
社区成员




- m_wndStatusBar.Create(WS_CHILD|WS_VISIBLE|CCS_BOTTOM,
- CRect(0,0,0,0), this, 0);
- // You can set the no. of parts of the StatusBar (4 in this case)
- // and the width of each part not -1 means remaining width
- int strPartDim[4]= {180, 260, 340, -1};
- m_wndStatusBar.SetParts(4, strPartDim);
- m_wndStatusBar.SetText(_T("Dialog / StatusBar / Toolbar"),0,0);
- m_wndStatusBar.SetText(_T("Example"), 1, 0);
21年路过。。。
void CLotteryDlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
// TODO: 在此处添加消息处理程序代码
CRect rect;
GetClientRect(&rect);
ASSERT(m_wndStatusBar.SetWindowPos(&wndTop,0,rect.bottom-20,cx,20,SWP_DRAWFRAME));
}
void CLotteryDlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
// TODO: 在此处添加消息处理程序代码
CRect rt;
GetClientRect(&rt);
rt.top = rt.bottom - 20;
m_wndStatusBar.MoveWindow(&rt);
}
m_wndStatusBar.Create(WS_CHILD|WS_VISIBLE|CBRS_BOTTOM,
CRect(0,0,0,0), this,AFX_IDW_STATUS_BAR);
// You can set the no. of parts of the StatusBar (4 in this case)
// and the width of each part not -1 means remaining width
int strPartDim[4]= {180, 260, 340, -1};
m_wndStatusBar.SetParts(4, strPartDim);
m_wndStatusBar.SetText(_T("Dialog / StatusBar / Toolbar"),0,0);
m_wndStatusBar.SetText(_T("Example"), 1, 0);