X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3ebcfb769f52c756018de75dacf3218ff60a8768..496beb3fc0244c36bdb0e37055aa868012b52a23:/src/msw/mdi.cpp diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index a8c09a6952..c71a0a8d37 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -163,10 +163,6 @@ bool wxMDIParentFrame::Create(wxWindow *parent, long style, const wxString& name) { - m_defaultIcon = (WXHICON) (wxSTD_MDIPARENTFRAME_ICON - ? wxSTD_MDIPARENTFRAME_ICON - : wxDEFAULT_MDIPARENTFRAME_ICON); - m_clientWindow = NULL; m_currentChild = NULL; @@ -270,19 +266,20 @@ wxMDIParentFrame::~wxMDIParentFrame() } } +#if wxUSE_MENUS_NATIVE + void wxMDIParentFrame::InternalSetMenuBar() { -// HMENU subMenu = GetSubMenu((HMENU) m_windowMenu, 0); - m_parentFrameActive = TRUE; - HMENU subMenu = (HMENU) 0; - if (GetWindowMenu()) - subMenu = (HMENU) GetWindowMenu()->GetHMenu(); + wxMenu *menu = GetWindowMenu(); + HMENU subMenu = menu ? GetHmenuOf(menu) : 0; InsertWindowMenu(GetClientWindow(), m_hMenu, subMenu); } +#endif // wxUSE_MENUS_NATIVE + void wxMDIParentFrame::SetWindowMenu(wxMenu* menu) { if (m_windowMenu) @@ -348,6 +345,12 @@ void wxMDIParentFrame::OnSysColourChanged(wxSysColourChangedEvent& event) event.Skip(); } +WXHICON wxMDIParentFrame::GetDefaultIcon() const +{ + return (WXHICON)(wxSTD_MDIPARENTFRAME_ICON ? wxSTD_MDIPARENTFRAME_ICON + : wxDEFAULT_MDIPARENTFRAME_ICON); +} + // --------------------------------------------------------------------------- // MDI operations // --------------------------------------------------------------------------- @@ -646,9 +649,6 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent, long style, const wxString& name) { - m_defaultIcon = (WXHICON)(wxSTD_MDICHILDFRAME_ICON ? wxSTD_MDICHILDFRAME_ICON - : wxDEFAULT_MDICHILDFRAME_ICON); - SetName(name); wxWindowBase::Show(TRUE); // MDI child frame starts off shown @@ -813,6 +813,12 @@ void wxMDIChildFrame::InternalSetMenuBar() parent->m_parentFrameActive = FALSE; } +WXHICON wxMDIChildFrame::GetDefaultIcon() const +{ + return (WXHICON)(wxSTD_MDICHILDFRAME_ICON ? wxSTD_MDICHILDFRAME_ICON + : wxDEFAULT_MDICHILDFRAME_ICON); +} + // --------------------------------------------------------------------------- // MDI operations // --------------------------------------------------------------------------- @@ -1045,7 +1051,7 @@ bool wxMDIChildFrame::HandleGetMinMaxInfo(void *mmInfo) // let the default window proc calculate the size of MDI children // frames because it is based on the size of the MDI client window, // not on the values specified in wxWindow m_max variables - bool processed = MSWDefWindowProc(WM_GETMINMAXINFO, 0, (LPARAM)mmInfo); + bool processed = MSWDefWindowProc(WM_GETMINMAXINFO, 0, (LPARAM)mmInfo) != 0; // but allow GetSizeHints() to set the min size if ( m_minWidth != -1 )