X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0f984728e5cac4d20f004aa962b15e9a30d91e6..bf25c88b6ab494b22c732406237c6957e26d72d9:/src/msw/toplevel.cpp diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 2376e815e6..f20ea07524 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -41,7 +41,6 @@ #include "wx/module.h" #include "wx/msw/private.h" - #if defined(__WXWINCE__) #include #include @@ -51,6 +50,7 @@ #include "wx/msw/wince/missing.h" #endif +#include "wx/msw/missing.h" #include "wx/msw/winundef.h" // This can't be undefed in winundef.h or @@ -514,6 +514,23 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent, EnableCloseButton(false); } + // for some reason we need to manually send ourselves this message as + // otherwise the mnemonics are always shown -- even if they're configured + // to be hidden until "Alt" is pressed in the control panel + // + // this could indicate a bug somewhere else but for now this is the only + // fix we have + if ( ret ) + { + SendMessage + ( + GetHwnd(), + WM_UPDATEUISTATE, + MAKEWPARAM(UIS_INITIALIZE, UISF_HIDEFOCUS | UISF_HIDEACCEL), + 0 + ); + } + return ret; }