Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Can I chang the background color of Toolbar? Collapse All
Subject Author Date
Michael chang Sep 29, 2008 - 1:07 AM


I’m developing the MDI application based on the FunnyBar Sample.

I want to change the background color of Toolbar in my application or Funnybar sample.


Technical Support Oct 6, 2008 - 1:13 PM

Unfortunately, you cannot easily modify the background color with some method or variable. The only way is to override the painting methods like as follows:

class CMyToolControlBar : public CExtToolControlBar
            void DoEraseBk( CDC * pDC )
                        ASSERT( pDC->GetSafeHdc() != NULL );
                        CRect rcClient;
                        GetClientRect( &rcClient );
                        pDC->FillSolidRect( &rcClient, RGB(255,0,0) );