From 2c62b3c3a12380d13e9f1b1c21edb01657dbb612 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 6 Dec 2002 23:42:16 +0000 Subject: [PATCH] corrected a too eager error message (patch 648599) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18078 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/mdi.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 41e02c6b1b..1afd35dd6c 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -1352,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; } -- 2.45.2