X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f09d8a3b940bbdfdc1907f1de97ba99e297a315c..ef70f0ecdbc4268923e132b257c95e8a2525f4ca:/src/os2/accel.cpp?ds=sidebyside diff --git a/src/os2/accel.cpp b/src/os2/accel.cpp index bda2003f77..a93f7f1af6 100644 --- a/src/os2/accel.cpp +++ b/src/os2/accel.cpp @@ -90,7 +90,7 @@ wxAcceleratorTable::wxAcceleratorTable( ::WinSetAccelTable( vHabmain ,hAccel - ,(HWND)pFrame->GetFrame() + ,(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() @@ -153,7 +162,7 @@ wxAcceleratorTable::wxAcceleratorTable( ::WinSetAccelTable( vHabmain ,M_ACCELDATA->m_hAccel - ,(HWND)pFrame->GetFrame() + ,(HWND)pFrame->GetHWND() ); } @@ -187,11 +196,22 @@ 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); +// ::WinTranslateAccel( vHabmain +// ,(HWND)hWnd +// ,GetHaccel() +// ,pMsg +// ); } // end of wxAcceleratorTable::Translate