]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dlgcmn.cpp
Allow wx parents a chance to handle events fired by non-wx children. (i.e. wxActiveX...
[wxWidgets.git] / src / common / dlgcmn.cpp
index 8ac52135d935b862c03b886d9856ba450e1a0b10..ba4e88cbbe8dc8f2abc623d1a87b4bdce9b4ca56 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "dialogbase.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -112,7 +108,8 @@ void wxDialogBase::Init()
 {
     m_returnCode = 0;
     m_affirmativeId = wxID_OK;
 {
     m_returnCode = 0;
     m_affirmativeId = wxID_OK;
-    
+    m_escapeId = wxID_ANY;
+
     // the dialogs have this flag on by default to prevent the events from the
     // dialog controls from reaching the parent frame which is usually
     // undesirable and can lead to unexpected and hard to find bugs
     // the dialogs have this flag on by default to prevent the events from the
     // dialog controls from reaching the parent frame which is usually
     // undesirable and can lead to unexpected and hard to find bugs
@@ -336,8 +333,6 @@ wxStdDialogButtonSizer *wxDialogBase::CreateStdDialogButtonSizer( long flags )
         sizer->AddButton(help);
     }
 
         sizer->AddButton(help);
     }
 
-    sizer->Realize();
-
     if (flags & wxNO_DEFAULT)
     {
         if (no)
     if (flags & wxNO_DEFAULT)
     {
         if (no)
@@ -359,12 +354,14 @@ wxStdDialogButtonSizer *wxDialogBase::CreateStdDialogButtonSizer( long flags )
             yes->SetFocus();
         }
     }
             yes->SetFocus();
         }
     }
-    
+
     if (flags & wxOK)
         SetAffirmativeId(wxID_OK);
     else if (flags & wxYES)
         SetAffirmativeId(wxID_YES);
 
     if (flags & wxOK)
         SetAffirmativeId(wxID_OK);
     else if (flags & wxYES)
         SetAffirmativeId(wxID_YES);
 
+    sizer->Realize();
+
     return sizer;
 }
 
     return sizer;
 }