Hi,
I reported a bug in this function a while ago, was completly ignored, which is not something new...
However, I did fix it, and would like to share it with the community, so that if somebody have this problem it might be of help.
This is the bug description:
If you try to paint a button inside a grid cell using direct call to PaintPushButton
and using the CExtPaintManagerOffice2007_R2_Obsidian
, with a specific color for the text, to color is inverted to white.
The reason is because this theme is dark, so the library inverts the default text color to white, so that it will be readable. However, it does so even if you give it a color you explicitly want. The solution is to not invert the text color if a specific color is passed in.
These are the last lines of the function, and my addition is highlighted:
if( bInvertNormalTextColor && _ppbd.m_clrForceTextNormal == COLORREF(-1L))
_ppbd.m_clrForceTextNormal = RGB(255,255,255);
if( _ppbd.m_clrForceTextDisabled == COLORREF(-1L) )
_ppbd.m_clrForceTextDisabled = RGB(141,141,141);
CExtPaintManagerOffice2007_Impl::PaintPushButton( dc, _ppbd );
}