void CMyTab::DrawItem( LPDRAWITEMSTRUCT lpDrawItemStruct)
{
  CDC * pDC = CDC::FromHandle(lpDIS->hDC);
  pDC->FillSolidRect(0,0,50,50,RGB(20,100,100));
//有了pDC后,你想怎么画就怎么画了。
//要用好lpDrawItemStruct->itemData
}

解决方案 »

  1.   

    void CMyTab::DrawItem( LPDRAWITEMSTRUCT lpDrawItemStruct)
    {
      CDC * pDC = CDC::FromHandle(lpDrawItemStruct->hDC);
      pDC->FillSolidRect(0,0,50,50,RGB(20,100,100));
    //有了pDC后,你想怎么画就怎么画了。
    //要用好lpDrawItemStruct->itemData
    }
      

  2.   

    http://www.codeguru.com/controls/LBTabCtrl.shtml
    Fully Owner Drawn Tab Control - Oleg Lobach (2000/02/01)
    Great article on creating advanced tabs for your application 
    http://www.codeguru.com/controls/ownerdraw_tab.shtml
    Implementing an owner drawn Tab Control - Chris Maunder (1999/01/24)