]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dialog.cpp
Unicodified wxSplitPath
[wxWidgets.git] / src / msw / dialog.cpp
index 14f2cfb07db800874b56cde5d4a215266dc9fb49..d2f6a22272386de1aa88a3726161bb154c6fee2b 100644 (file)
@@ -111,6 +111,9 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
     if (height < 0)
         height = 500;
 
+    // All dialogs should really have this style
+    m_windowStyle |= wxTAB_TRAVERSAL;
+
     WXDWORD extendedStyle = MakeExtendedStyle(m_windowStyle);
     if (m_windowStyle & wxSTAY_ON_TOP)
         extendedStyle |= WS_EX_TOPMOST;
@@ -135,7 +138,7 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
 
     if ( !hwnd )
     {
-        wxLogError(_("Failed to created dialog."));
+        wxLogError(_("Failed to create dialog."));
 
         return FALSE;
     }
@@ -208,13 +211,13 @@ void wxDialog::OnCharHook(wxKeyEvent& event)
   {
     if (event.m_keyCode == WXK_ESCAPE)
     {
-    // Behaviour changed in 2.0: we'll send a Cancel message
-    // to the dialog instead of Close.
-    wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
-    cancelEvent.SetEventObject( this );
-    GetEventHandler()->ProcessEvent(cancelEvent);
+        // Behaviour changed in 2.0: we'll send a Cancel message
+        // to the dialog instead of Close.
+        wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
+        cancelEvent.SetEventObject( this );
+        GetEventHandler()->ProcessEvent(cancelEvent);
 
-    return;
+        return;
     }
   }
   // We didn't process this event.
@@ -557,7 +560,7 @@ void wxDialog::OnCancel(wxCommandEvent& event)
     else
     {
         SetReturnCode(wxID_CANCEL);
-    this->Show(FALSE);
+        this->Show(FALSE);
     }
 }
 
@@ -617,4 +620,4 @@ void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& event)
   SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
   Refresh();
 #endif
-}
\ No newline at end of file
+}