CMFCToolBar backgroung color

  • Thread starter Thread starter AlexanderZel
  • Start date Start date
A

AlexanderZel

Guest
Hi,

I'm trying to change the background color of my toolbar.

class CMyToolBar : public CMFCToolBar { void OnFillBackground(CDC* pDC) ; };


void CMyToolBar ::OnFillBackground(CDC* pDC) { CRect crect; this->GetClientRect(&crect); CDC *pdcCtrl = this->GetDC(); CDC dcDst; dcDst.CreateCompatibleDC(pdcCtrl); dcDst.FillSolidRect(&crect,RGB(255,0,0)); } The function is being called from CMFCToolBar::DoPaint(CDC* pDCPaint), but no color change.

Thanks,

Alex

Continue reading...
 
Back
Top