]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dialog.cpp
set error to GSOCK_TIMEOUT if the socket timed out (modified and extended patch 1303554)
[wxWidgets.git] / src / msw / dialog.cpp
index d5a9b749305b2991b181019d049aa3c48d17b3c1..b111bac7e28ef4fb9282902d20a929f3d6e00cc3 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "dialog.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"
 
@@ -33,6 +29,7 @@
     #include "wx/utils.h"
     #include "wx/frame.h"
     #include "wx/app.h"
     #include "wx/utils.h"
     #include "wx/frame.h"
     #include "wx/app.h"
+    #include "wx/button.h"
     #include "wx/settings.h"
     #include "wx/intl.h"
     #include "wx/log.h"
     #include "wx/settings.h"
     #include "wx/intl.h"
     #include "wx/log.h"
@@ -387,7 +384,7 @@ bool wxDialog::EmulateButtonClickIfPresent(int id)
 {
     wxButton *btn = wxDynamicCast(FindWindow(id), wxButton);
 
 {
     wxButton *btn = wxDynamicCast(FindWindow(id), wxButton);
 
-    if ( !btn || !btn->IsEnabled() )
+    if ( !btn || !btn->IsEnabled() || !btn->IsShown() )
         return false;
 
     btn->MSWCommand(BN_CLICKED, 0 /* unused */);
         return false;
 
     btn->MSWCommand(BN_CLICKED, 0 /* unused */);