X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b36d8c8f112a9a649d659573677c25a294ca8a3c..780bb8744b5a9d9492831f0bd338251aa4641c56:/src/msw/toplevel.cpp diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 9aeb9eefd5..6c7b38718b 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -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)"));