diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index 51a09d5579..c1c4e3555b 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -601,7 +601,7 @@ private: // kbd code translation WXDLLIMPEXP_CORE int wxCharCodeMSWToWX(int keySym, WXLPARAM lParam = 0); -WXDLLIMPEXP_CORE WXWORD wxCharCodeWXToMSW(int id, bool *IsVirtual = NULL); +WXDLLIMPEXP_CORE WXWORD wxCharCodeWXToMSW(int id); // window creation helper class: before creating a new HWND, instantiate an // object of this class on stack - this allows to process the messages sent to diff --git a/src/msw/accel.cpp b/src/msw/accel.cpp index dfcb758f2b..f3e2f10c7f 100644 --- a/src/msw/accel.cpp +++ b/src/msw/accel.cpp @@ -34,8 +34,6 @@ #include "wx/msw/private.h" -extern WXWORD wxCharCodeWXToMSW(int id, bool *isVirtual); - IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject) // ---------------------------------------------------------------------------- @@ -105,19 +103,15 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[] { int flags = entries[i].GetFlags(); - BYTE fVirt = 0; + BYTE fVirt = FVIRTKEY; if ( flags & wxACCEL_ALT ) - fVirt |= FALT | FVIRTKEY; + fVirt |= FALT; if ( flags & wxACCEL_SHIFT ) - fVirt |= FSHIFT | FVIRTKEY; + fVirt |= FSHIFT; if ( flags & wxACCEL_CTRL ) - fVirt |= FCONTROL | FVIRTKEY; + fVirt |= FCONTROL; - bool isVirtual; - - WORD key = wxCharCodeWXToMSW(entries[i].GetKeyCode(), &isVirtual); - if (isVirtual) - fVirt |= FVIRTKEY; + WORD key = wxCharCodeWXToMSW(entries[i].GetKeyCode()); arr[i].fVirt = fVirt; arr[i].key = key; diff --git a/src/msw/window.cpp b/src/msw/window.cpp index bad095f9e9..be4d7d01d2 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -6095,11 +6095,8 @@ int wxCharCodeMSWToWX(int vk, WXLPARAM lParam) return wxk; } -WXWORD wxCharCodeWXToMSW(int wxk, bool *isVirtual) +WXWORD wxCharCodeWXToMSW(int wxk) { - if ( isVirtual ) - *isVirtual = true; - // check the table first for ( size_t n = 0; n < WXSIZEOF(gs_specialKeys); n++ ) { @@ -6174,8 +6171,6 @@ WXWORD wxCharCodeWXToMSW(int wxk, bool *isVirtual) else #endif // !__WXWINCE__ { - if ( isVirtual ) - *isVirtual = false; vk = (WXWORD)wxk; } }