]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/accel.cpp
a fix for the last fix
[wxWidgets.git] / src / os2 / accel.cpp
index 1fdc45861f6aab2dee33396a19392c8bc4bdba16..611f53c95985557305158c9a98b50e1738a28121 100644 (file)
@@ -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;
@@ -152,8 +152,8 @@ wxAcceleratorTable::wxAcceleratorTable(
         wxFrame*                    pFrame = (wxFrame*)wxTheApp->GetTopWindow();
 
         ::WinSetAccelTable( vHabmain
-                           ,(HWND)pFrame->GetFrame()
                            ,M_ACCELDATA->m_hAccel
+                           ,(HWND)pFrame->GetHWND()
                           );
     }
 
@@ -187,11 +187,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