]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
don't overwrite the app name with argv[0] if it had been already set
[wxWidgets.git] / src / msw / window.cpp
index 3acb8366a90f09bb43a0aa071f7730d1b754893c..07d4a17190f9ac956421f2bc1508111e0758c56f 100644 (file)
@@ -502,6 +502,12 @@ bool wxWindowMSW::Enable(bool enable)
     if ( hWnd )
         ::EnableWindow(hWnd, (BOOL)enable);
 
+    // the logic below doesn't apply to the top level windows -- otherwise
+    // showing a modal dialog would result in total greying out (and ungreying
+    // out later) of everything which would be really ugly
+    if ( IsTopLevel() )
+        return TRUE;
+
     // when the parent is disabled, all of its children should be disabled as
     // well but when it is enabled back, only those of the children which
     // hadn't been already disabled in the beginning should be enabled again,
@@ -1457,11 +1463,15 @@ void wxWindowMSW::Refresh(bool eraseBack, const wxRect *rect)
 
 void wxWindowMSW::Update()
 {
+#ifdef __WXWINE__
+    ::UpdateWindow(GetHwnd());
+#else
     if ( !::UpdateWindow(GetHwnd()) )
     {
         wxLogLastError(_T("UpdateWindow"));
     }
-
+#endif
+    
 #if defined(__WIN32__) && !defined(__WXMICROWIN__)
     // just calling UpdateWindow() is not enough, what we did in our WM_PAINT
     // handler needs to be really drawn right now