X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8732e03336e395c73fe74ea7e264d42fad0060df..7848088476db284a94f19eeb24411b45d676ac46:/src/msw/dialog.cpp diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 20b10cd112..f43c35fe3f 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -113,8 +113,6 @@ BEGIN_EVENT_TABLE(wxDialog, wxDialogBase) EVT_BUTTON(wxID_APPLY, wxDialog::OnApply) EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel) - EVT_CHAR_HOOK(wxDialog::OnCharHook) - EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged) EVT_CLOSE(wxDialog::OnCloseWindow) @@ -214,35 +212,6 @@ wxDialog::~wxDialog() Show(FALSE); } -// ---------------------------------------------------------------------------- -// kbd handling -// ---------------------------------------------------------------------------- - -// By default, pressing escape cancels the dialog -void wxDialog::OnCharHook(wxKeyEvent& event) -{ - if (GetHWND()) - { - // "Esc" works as an accelerator for the "Cancel" button, but it - // shouldn't close the dialog which doesn't have any cancel button - if ( (event.m_keyCode == WXK_ESCAPE) && FindWindow(wxID_CANCEL) ) - { - wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); - cancelEvent.SetEventObject( this ); - GetEventHandler()->ProcessEvent(cancelEvent); - - // ensure that there is another message for this window so the - // ShowModal loop will exit and won't get stuck in GetMessage(). - ::PostMessage(GetHwnd(), WM_NULL, 0, 0); - - return; - } - } - - // We didn't process this event. - event.Skip(); -} - // ---------------------------------------------------------------------------- // showing the dialogs // ---------------------------------------------------------------------------- @@ -471,9 +440,9 @@ void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event)) // dialog window proc // --------------------------------------------------------------------------- -long wxDialog::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam) +WXLRESULT wxDialog::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { - long rc = 0; + WXLRESULT rc = 0; bool processed = FALSE; switch ( message )