Home > Software engineering >  Single document toolbar background color
Single document toolbar background color

Time:10-01

I want to change the MFC wizard generated by single docs toolbar background color (not the background of the button), but to look a lot of information on the Internet, not a success, with which master can tell me, please the detailed point! The best background color is my guide in the pictures,

CodePudding user response:

//change the back color of TB
HBRUSH newBr=CreateSolidBrush (RGB (212122212));
SetClassLong (m_wndToolBar m_hWnd, GCL_HBRBACKGROUND, (long) newBr);

Use the
CreatePatternBrush (& amp; BMP);
Make your background Brush

CodePudding user response:

Thank you for your reply! But you can say clear point? What is m_hWnd parameter? CreatePatternBrush (& amp; BMP); What is the inside of the BMP and parameters? This function is used directly?

CodePudding user response:

A. 1 m_wndToolBar m_hWnd
2 CBitmap BMP.
BMP. LoadBitmap (IDB_BITMAP1);
M_CrayonBr. CreatePatternBrush (& amp; BMP);

  • Related