X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e1bdd5078c90d3813a815fc86ee3dd050b2ee1d3..d21d2e5adf7a5acf3b496a9c4e87eab220bd75d8:/src/msw/dialog.cpp diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 3fbad08474..ac887e8c85 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -41,7 +41,7 @@ #include "wx/msw/private.h" #include "wx/log.h" -#if wxUSE_COMMON_DIALOGS +#if wxUSE_COMMON_DIALOGS && !defined(__WXMICROWIN__) #include #endif @@ -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 ) @@ -322,18 +290,6 @@ bool wxDialog::Show(bool show) { // use it m_parent = parent; - - // VZ: to make dialog behave properly we should reparent - // the dialog for Windows as well - unfortunately, - // following the docs for SetParent() results in this - // code which plainly doesn't work -#if 0 - long dwStyle = ::GetWindowLong(GetHwnd(), GWL_STYLE); - dwStyle &= ~WS_POPUP; - dwStyle |= WS_CHILD; - ::SetWindowLong(GetHwnd(), GWL_STYLE, dwStyle); - ::SetParent(GetHwnd(), GetHwndOf(parent)); -#endif // 0 } }