如何改变状态栏的大小,麻烦哪位告知

解决方案 »

  1.   

    m_wndStatusBar.SetPaneInfo(3,3,SBPS_NORMAL,160);
    最后160就是大小
      

  2.   


    void CMainFrame::OnSize(UINT nType, int cx, int cy) 
    {
    CMDIFrameWnd::OnSize(nType, cx, cy);

    SetStatusPanel(cx);
    }void CMainFrame::SetStatusPanel(int nWidth)
    {
    const int nParts = 7;
    int widths[nParts] = {nWidth-420, nWidth-300, nWidth-180, nWidth-145, nWidth-110, nWidth-75, -1};
    if (m_wndStatusBar)
    {
    if (nWidth < 400)
    {
    widths[0] = nWidth*2/5;
    widths[1] = nWidth*11/20;
    widths[2] = nWidth*29/40;
    widths[3] = nWidth*31/40;
    widths[4] = nWidth*33/40;
    widths[5] = nWidth*35/40;
    widths[6] = -1;
    }
    }
    else
    return;
    m_wndStatusBar.GetStatusBarCtrl().SetParts(nParts, widths);
    }
      

  3.   

    m_wndStatusBar.SetPaneInfo(m_wndStatusBar.CommandToIndex(ID_INDICATOR_1),ID_INDICATOR_1,SBPS_NORMAL,70)