X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/86f1458257289bc8f7d8ca4a5870ec9f5fc5a57e..443aec6f41be3d7428a2c61accc611b42dc9238d:/src/msw/dialog.cpp?ds=sidebyside diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 620a3de16a..7a3531d84b 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -127,38 +127,6 @@ bool wxDialog::Create(wxWindow *parent, return TRUE; } -bool wxDialog::EnableCloseButton(bool enable) -{ -#ifndef __WXMICROWIN__ - // get system (a.k.a. window) menu - HMENU hmenu = ::GetSystemMenu(GetHwnd(), FALSE /* get it */); - if ( !hmenu ) - { - wxLogLastError(_T("GetSystemMenu")); - - return FALSE; - } - - // enabling/disabling the close item from it also automatically - // disables/enabling the close title bar button - if ( !::EnableMenuItem(hmenu, SC_CLOSE, - MF_BYCOMMAND | (enable ? MF_ENABLED : MF_GRAYED)) ) - { - wxLogLastError(_T("EnableMenuItem(SC_CLOSE)")); - - return FALSE; - } - - // update appearance immediately - if ( !::DrawMenuBar(GetHwnd()) ) - { - wxLogLastError(_T("DrawMenuBar")); - } -#endif - - return TRUE; -} - void wxDialog::SetModal(bool flag) { if ( flag )