In an C++ MFC project I'm using CMFCMenuButton
using MSVC 2013.
When I toggle the high contrast mode the button is not properly repainted (for comparison a normal button is displayed):
Calling Invalidate()
or ShowWindow(SW_HIDE);ShowWindow(SW_SHOW);
seem to have no effect - even minimizing the dialog does not cause a proper redraw. How can I force the button to repaint with the updated system color?
Update: Forcing the colors after toggling contrast mode just makes the button text visible, however the button itself, the border, is not visible.
m_ctrlOkButton.SetFaceColor(::GetSysColor(COLOR_BTNFACE));
m_ctrlOkButton.SetTextColor(::GetSysColor(COLOR_BTNTEXT));