X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..bd996abe63a8ed6aa07b26856a0d7935002e3e81:/src/os2/accel.cpp diff --git a/src/os2/accel.cpp b/src/os2/accel.cpp index 1fdc45861f..039439d25d 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->GetFrame() ); } M_ACCELDATA->m_hAccel = hAccel; @@ -105,7 +105,7 @@ extern int wxCharCodeWXToOS2( // Create from an array wxAcceleratorTable::wxAcceleratorTable( int n -, wxAcceleratorEntry vaEntries[] +, const wxAcceleratorEntry vaEntries[] ) { int nAccelLength = ((sizeof(ACCEL) * n) + sizeof(ACCELTABLE)); @@ -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() @@ -139,7 +148,7 @@ wxAcceleratorTable::wxAcceleratorTable( pArr->aaccel[i].key = uKey; pArr->aaccel[i].cmd = uCmd; } - pArr->codepage = 437; // default to english Fix??? + pArr->codepage = 437; pArr->cAccel = (USHORT)n; M_ACCELDATA->m_hAccel = ::WinCreateAccelTable( vHabmain ,pArr @@ -152,8 +161,8 @@ wxAcceleratorTable::wxAcceleratorTable( wxFrame* pFrame = (wxFrame*)wxTheApp->GetTopWindow(); ::WinSetAccelTable( vHabmain - ,(HWND)pFrame->GetFrame() ,M_ACCELDATA->m_hAccel + ,(HWND)pFrame->GetFrame() ); } @@ -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