怎样更改状态栏字体的颜色?

解决方案 »

  1.   

    继承CStatusBar类,重载DrawItem()函数,在该函数中设置颜色
      

  2.   

    http://www.codeguru.com/Cpp/controls/statusbar/advanced/article.php/c5929/
      

  3.   

    状态栏由WM_NOTIFY消息发送给父窗口,楼主可以试着这个去设置,
    具体请参看MSDN
      

  4.   

    自绘。
    要不m_statusbar.SetFont(***); 我也没试过,不知道好不好使。
      

  5.   

    看跑题了。不能SetFont. 还是继承,自绘。
      

  6.   

    继承CStatusBar类,重载DrawItem()函数,在该函数中设置颜色
      

  7.   

    状态条是一个窗口,可以改变颜色,字体
    首先要将CMainFrame中的m_pStatusBar改为public:型的
    然后再处理状态条更新
    其中的cGRAY.cGREEN是背景色和前景色void CTelnet2View::OnUpdateSendRecv(CCmdUI *pCmdUI)
    {
      CWnd *pWnd=pCmdUI->m_pOther;
    CDC *pDC=pWnd->GetDC();
    CRect rect;
    ((CMainFrame *)AfxGetMainWnd())->m_wndStatusBar.GetItemRect(pCmdUI->m_nIndex,&rect);
    CBrush brush(cGRAY);
    pDC->FillRect(rect,&brush);
    pDC->SetBkMode(TRANSPARENT);
    pDC->SetTextColor(cGREEN);
    pDC->TextOut(rect.TopLeft().x,rect.TopLeft().y,"Hello,World");
    }
      

  8.   

    http://www.codeguru.com/Cpp/controls/statusbar/article.php/c2969