]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/accel.cpp
fix for dialog navigation in the modal dialogs: do call IsDialogMessage() in this...
[wxWidgets.git] / src / os2 / accel.cpp
index 1b901b20c4bf966c9a73e4eb7975b8c80b231805..09aa343e0a222e3c158736122bf2e3ab6a0401fe 100644 (file)
@@ -90,7 +90,7 @@ wxAcceleratorTable::wxAcceleratorTable(
 
         ::WinSetAccelTable( vHabmain
                            ,hAccel
 
         ::WinSetAccelTable( vHabmain
                            ,hAccel
-                           ,(HWND)pFrame->GetHWND()
+                           ,(HWND)pFrame->GetFrame()
                           );
     }
     M_ACCELDATA->m_hAccel = hAccel;
                           );
     }
     M_ACCELDATA->m_hAccel = hAccel;
@@ -105,7 +105,7 @@ extern int wxCharCodeWXToOS2(
 // Create from an array
 wxAcceleratorTable::wxAcceleratorTable(
   int                               n
 // Create from an array
 wxAcceleratorTable::wxAcceleratorTable(
   int                               n
-, wxAcceleratorEntry                vaEntries[]
+, const wxAcceleratorEntry          vaEntries[]
 )
 {
     int                             nAccelLength = ((sizeof(ACCEL) * n) + sizeof(ACCELTABLE));
 )
 {
     int                             nAccelLength = ((sizeof(ACCEL) * n) + sizeof(ACCELTABLE));
@@ -120,11 +120,20 @@ wxAcceleratorTable::wxAcceleratorTable(
         USHORT                      uVirt = AF_CHAR;
 
         if (vaEntries[i].GetFlags() & wxACCEL_ALT)
         USHORT                      uVirt = AF_CHAR;
 
         if (vaEntries[i].GetFlags() & wxACCEL_ALT)
+        {
             uVirt |= AF_ALT;
             uVirt |= AF_ALT;
+            uVirt |= AF_VIRTUALKEY;
+        }
         if (vaEntries[i].GetFlags() & wxACCEL_SHIFT)
         if (vaEntries[i].GetFlags() & wxACCEL_SHIFT)
+        {
             uVirt |= AF_SHIFT;
             uVirt |= AF_SHIFT;
+            uVirt |= AF_VIRTUALKEY;
+        }
         if (vaEntries[i].GetFlags() & wxACCEL_CTRL)
         if (vaEntries[i].GetFlags() & wxACCEL_CTRL)
+        {
             uVirt |= AF_CONTROL;
             uVirt |= AF_CONTROL;
+            uVirt |= AF_VIRTUALKEY;
+        }
 
         bool                        bIsVirtual;
         USHORT                      uKey = wxCharCodeWXToOS2( vaEntries[i].GetKeyCode()
 
         bool                        bIsVirtual;
         USHORT                      uKey = wxCharCodeWXToOS2( vaEntries[i].GetKeyCode()
@@ -153,7 +162,7 @@ wxAcceleratorTable::wxAcceleratorTable(
 
         ::WinSetAccelTable( vHabmain
                            ,M_ACCELDATA->m_hAccel
 
         ::WinSetAccelTable( vHabmain
                            ,M_ACCELDATA->m_hAccel
-                           ,(HWND)pFrame->GetHWND()
+                           ,(HWND)pFrame->GetFrame()
                           );
     }
 
                           );
     }
 
@@ -187,11 +196,17 @@ bool wxAcceleratorTable::Translate(
 ) const
 {
     PQMSG                           pMsg = (PQMSG)pWxmsg;
 ) 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
 
 } // end of wxAcceleratorTable::Translate