X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/564b260950a9a370bf9231f7432caced5156ba1b..184533062405d1eda4dd464a43e7469d7bbcc2b5:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 3c61e27b28..1569498479 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -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))