]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dialog.cpp
make sure we are comparing the stripped strings
[wxWidgets.git] / src / msw / dialog.cpp
index 20b10cd112758af665cb9db7addbe4d0ba3e7fae..f43c35fe3fdc9687baa93f8029a29a3890f2f65c 100644 (file)
@@ -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 )