X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a91cf80c60aa43454a65a7a0c8db92b168848b98..ef3a5e0aae003c29941c7d41ed6becea4287752d:/src/msw/toplevel.cpp?ds=inline diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 005d4a78bf..6c7b38718b 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -258,7 +258,7 @@ bool wxTopLevelWindowMSW::CreateDialog(const wxChar *dlgTemplate, // and passing CW_USEDEFAULT to MoveWindow() results in resizing the // window to (0, 0) size which breaks quite a lot of things, e.g. the // sizer calculation in wxSizer::Fit() - if ( w == CW_USEDEFAULT ) + if ( w == (int)CW_USEDEFAULT ) { // the exact number doesn't matter, the dialog will be resized // again soon anyhow but it should be big enough to allow @@ -268,7 +268,7 @@ bool wxTopLevelWindowMSW::CreateDialog(const wxChar *dlgTemplate, h = 100; } - if ( x == CW_USEDEFAULT ) + if ( x == (int)CW_USEDEFAULT ) { // well, where should we put it? maybe centre it on screen? x = @@ -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)"));