Change background color of Static control
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Why creating a brush doesn't accept high colors (only pure 16 colors)? This will create a red brush: m_rcBackColor=RGB(255,0,0); Cbrush br(m_rcBackColor); or br.CreateSolidBrush(m_rcBackColor); But this will create a gray brush: m_rcBackColor=RGB(254,0,0); Cbrush br(m_rcBackColor); A high color is changed to the closest pure color. I'm trying to put some text (as Static Control) on the main window and I want the text to have the same background as the window. If window has a pure color like white, or gray, or red, there's no problem. But if my window has a background set to, let's say, RGB(255,0,100), the text is displayed in gray background. Static control uses, by default, color of Dialog's background. Any ideas? Jerzy.