In a C ++ MFC project, I'm using CMFCMenuButton using MSVC 2013.
When I switch the high contrast mode , the button is incorrectly repainted (for comparison, the usual button is displayed):

Call Invalidate() or ShowWindow(SW_HIDE);ShowWindow(SW_SHOW); It seems ineffective - even minimizing the dialogue does not cause the correct redrawing. How to make the button repaint the updated color of the system?
Update. Forcing colors after switching the contrast mode only makes the button text visible, but the button itself, the border, is not visible.
m_ctrlOkButton.SetFaceColor(::GetSysColor(COLOR_BTNFACE)); m_ctrlOkButton.SetTextColor(::GetSysColor(COLOR_BTNTEXT));
source share