CTabCtrl在xp下的背景为白色,但是换到2000下跑的时候背景却变成了灰色.
怎样才能使它在2000下和xp下的外观一样?

解决方案 »

  1.   

    CWnd::OnCtlColorHBRUSH CZilchDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) 
    {
      // Call the base class implementation first! Otherwise, it may
      // undo what we are trying to accomplish here.
      HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);  // Are we painting the IDC_MYSTATIC control? We can use
      // CWnd::GetDlgCtrlID() to perform the most efficient test.
      if (pWnd->GetDlgCtrlID() == IDC_MYSTATIC)
      {
        // Set the text color to red.
        pDC->SetTextColor(RGB(255, 0, 0));    // Set the background mode for text to transparent 
        // so background will show thru.
        pDC->SetBkMode(TRANSPARENT);    // Return handle to our CBrush object.
        hbr = m_brush;
      }  return hbr;
    }详细请查msdn
      

  2.   

    http://www.edacn.net/bbs/get.php?id=23516
      

  3.   

    http://support.microsoft.com/default.aspx?scid=kb;en-us;179909
      

  4.   

    处理WM_CTLCOLOR消息应该可以吧
      

  5.   

    通过一个类继承CTabCtrl,然后重写DrawItem解决了,注意是DrawItem而不是OnDrawItem.
      

  6.   

    看看msdn,自己搜索以下!例子还是满多的!