]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/toplevel.cpp
blind fix for wxGIFDecoder::ReadGIF
[wxWidgets.git] / src / msw / toplevel.cpp
index 9aeb9eefd5ad77bfd9503f130e43f5078d60ab7c..6c7b38718b045dfd99e91fbd67516772be35c4c3 100644 (file)
@@ -616,8 +616,9 @@ bool wxTopLevelWindowMSW::EnableCloseButton(bool enable)
 
     // enabling/disabling the close item from it also automatically
     // disables/enables the close title bar button
-    if ( !::EnableMenuItem(hmenu, SC_CLOSE,
-                           MF_BYCOMMAND | (enable ? MF_ENABLED : MF_GRAYED)) )
+    if ( ::EnableMenuItem(hmenu, SC_CLOSE,
+                          MF_BYCOMMAND |
+                          (enable ? MF_ENABLED : MF_GRAYED)) == -1 )
     {
         wxLogLastError(_T("EnableMenuItem(SC_CLOSE)"));