+void wxWindowMSW::MSWUpdateUIState(int action)
+{
+ // WM_UPDATEUISTATE only appeared in Windows 2000 so it can do us no good
+ // to use it on older systems -- and could possibly do some harm
+ static int s_needToUpdate = -1;
+ if ( s_needToUpdate == -1 )
+ {
+ int verMaj, verMin;
+ s_needToUpdate = wxGetOsVersion(&verMaj, &verMin) == wxWINDOWS_NT &&
+ verMaj >= 5;
+ }
+
+ if ( s_needToUpdate )
+ {
+ // NB: it doesn't seem to matter what we put in wParam, whether we
+ // include just one UISF_XXX or both, both are affected, no idea
+ // why
+ ::SendMessage(GetHwnd(), WM_UPDATEUISTATE,
+ MAKEWPARAM(action, UISF_HIDEFOCUS | UISF_HIDEACCEL), 0);
+ }
+}
+