X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..e1f14d226fceb8f77626a58bbddf7ace3b93d66c:/src/os2/accel.cpp diff --git a/src/os2/accel.cpp b/src/os2/accel.cpp index 1fdc45861f..8e1c6f43b6 100644 --- a/src/os2/accel.cpp +++ b/src/os2/accel.cpp @@ -89,8 +89,8 @@ wxAcceleratorTable::wxAcceleratorTable( wxFrame* pFrame = (wxFrame*)wxTheApp->GetTopWindow(); ::WinSetAccelTable( vHabmain - ,(HWND)pFrame->GetFrame() ,hAccel + ,(HWND)pFrame->GetHWND() ); } M_ACCELDATA->m_hAccel = hAccel; @@ -120,11 +120,20 @@ wxAcceleratorTable::wxAcceleratorTable( USHORT uVirt = AF_CHAR; if (vaEntries[i].GetFlags() & wxACCEL_ALT) + { uVirt |= AF_ALT; + uVirt |= AF_VIRTUALKEY; + } if (vaEntries[i].GetFlags() & wxACCEL_SHIFT) + { uVirt |= AF_SHIFT; + uVirt |= AF_VIRTUALKEY; + } if (vaEntries[i].GetFlags() & wxACCEL_CTRL) + { uVirt |= AF_CONTROL; + uVirt |= AF_VIRTUALKEY; + } bool bIsVirtual; USHORT uKey = wxCharCodeWXToOS2( vaEntries[i].GetKeyCode() @@ -152,8 +161,8 @@ wxAcceleratorTable::wxAcceleratorTable( wxFrame* pFrame = (wxFrame*)wxTheApp->GetTopWindow(); ::WinSetAccelTable( vHabmain - ,(HWND)pFrame->GetFrame() ,M_ACCELDATA->m_hAccel + ,(HWND)pFrame->GetHWND() ); } @@ -187,11 +196,17 @@ bool wxAcceleratorTable::Translate( ) const { PQMSG pMsg = (PQMSG)pWxmsg; - - return Ok() && ::WinTranslateAccel( vHabmain - ,(HWND)hWnd - ,GetHaccel() - ,pMsg - ); + BOOL rc = FALSE; + + rc = ::WinTranslateAccel( vHabmain + ,(HWND)hWnd + ,GetHaccel() + ,pMsg + ); + if (rc) + { + int x = 1; + } + return (Ok() && rc); } // end of wxAcceleratorTable::Translate