]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
a small GUI glitch corrected (if a frame with child frames was resized, it
[wxWidgets.git] / src / msw / window.cpp
index 3c61e27b286f9ae59eb8251f60861a684b598e65..15694984793a1d8807059f1e6450e36ca2acd2e4 100644 (file)
@@ -504,6 +504,12 @@ void wxWindow::ReleaseMouse(void)
   }
 }
 
+void wxWindow::SetAcceleratorTable(const wxAcceleratorTable& accel)
+{
+    m_acceleratorTable = accel;
+}
+
+
 // Push/pop event handler (i.e. allow a chain of event handlers
 // be searched)
 void wxWindow::PushEventHandler(wxEvtHandler *handler)
@@ -1025,10 +1031,19 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
           break;
         }
 
+        case WM_MOVE:
+          {
+            wxMoveEvent event(wxPoint(LOWORD(lParam), HIWORD(lParam)),
+                              m_windowId);
+            event.SetEventObject(this);
+            if ( !GetEventHandler()->ProcessEvent(event) )
+              Default();
+          }
+          break;
+
         case WM_WINDOWPOSCHANGING:
         {
-          WINDOWPOS *pos = (WINDOWPOS *)lParam;
-          MSWOnWindowPosChanging((void *)pos);
+          MSWOnWindowPosChanging((void *)lParam);
           break;
         }
 
@@ -1961,9 +1976,13 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg)
   return FALSE;
 }
 
-bool wxWindow::MSWTranslateMessage(WXMSG* WXUNUSED(pMsg))
+bool wxWindow::MSWTranslateMessage(WXMSG* pMsg)
 {
-    return FALSE;
+    if (m_acceleratorTable.Ok() &&
+          ::TranslateAccelerator((HWND) GetHWND(), (HACCEL) m_acceleratorTable.GetHACCEL(), (MSG *)pMsg))
+        return TRUE;
+    else
+        return FALSE;
 }
 
 long wxWindow::MSWOnMDIActivate(long WXUNUSED(flag), WXHWND WXUNUSED(activate), WXHWND WXUNUSED(deactivate))