]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/mdi.cpp
reset virtual root to NULL in DeleteAllItems()
[wxWidgets.git] / src / msw / mdi.cpp
index 611dbbe4aeb5d0505237bf99133cdd4954a98010..1afd35dd6c1ecac0c47fd1fcbbc0c7d548dfb6c4 100644 (file)
@@ -43,6 +43,8 @@
     #include "wx/log.h"
 #endif
 
+#if wxUSE_MDI_ARCHITECTURE && !defined(__WXUNIVERSAL__)
+
 #include "wx/mdi.h"
 #include "wx/msw/private.h"
 
@@ -1350,7 +1352,12 @@ static void RemoveWindowMenu(wxWindow *win, WXHMENU menu)
         {
             if ( !::GetMenuString(hMenu, i, buf, WXSIZEOF(buf), MF_BYPOSITION) )
             {
-                wxLogLastError(wxT("GetMenuString"));
+                // Ignore successful read of menu string with length 0 which
+                // occurs, for example, for a maximized MDI childs system menu
+                if ( ::GetLastError() != 0 )
+                {
+                    wxLogLastError(wxT("GetMenuString"));
+                }
 
                 continue;
             }
@@ -1387,3 +1394,7 @@ static void UnpackMDIActivate(WXWPARAM wParam, WXLPARAM lParam,
     *hwndDeact = (WXHWND)HIWORD(lParam);
 #endif // Win32/Win16
 }
+
+#endif
+// wxUSE_MDI_ARCHITECTURE && !defined(__WXUNIVERSAL__)
+