]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dialog.cpp
changes to match listctrl.h changes (forgot to commit yesterday, sorry)
[wxWidgets.git] / src / msw / dialog.cpp
index 3fbad08474679d2979b7d8b31c477daffa3d5ab2..7a3531d84b8f6e1c70294dbe6c84b25373f4b969 100644 (file)
@@ -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
                 }
             }