X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e1437298456a5b4904075f20733282e7771816aa..dd107c50be43e8d4dbdba20df162faf119a3781c:/src/msw/mdi.cpp?ds=sidebyside diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index e3196d4817..b0ede88e4e 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -180,12 +180,12 @@ bool wxMDIParentFrame::Create(wxWindow *parent, { m_windowMenu = new wxMenu; - m_windowMenu->Append(IDM_WINDOWCASCADE, wxT("&Cascade")); - m_windowMenu->Append(IDM_WINDOWTILEHOR, wxT("Tile &Horizontally")); - m_windowMenu->Append(IDM_WINDOWTILEVERT, wxT("Tile &Vertically")); + m_windowMenu->Append(IDM_WINDOWCASCADE, _("&Cascade")); + m_windowMenu->Append(IDM_WINDOWTILEHOR, _("Tile &Horizontally")); + m_windowMenu->Append(IDM_WINDOWTILEVERT, _("Tile &Vertically")); m_windowMenu->AppendSeparator(); - m_windowMenu->Append(IDM_WINDOWICONS, wxT("&Arrange Icons")); - m_windowMenu->Append(IDM_WINDOWNEXT, wxT("&Next")); + m_windowMenu->Append(IDM_WINDOWICONS, _("&Arrange Icons")); + m_windowMenu->Append(IDM_WINDOWNEXT, _("&Next")); } m_parentFrameActive = TRUE; @@ -300,7 +300,10 @@ void wxMDIParentFrame::SetWindowMenu(wxMenu* menu) { m_windowMenu = menu; if (GetMenuBar()) - InsertWindowMenu(GetClientWindow(), m_hMenu, (HMENU) m_windowMenu->GetHMenu()); + { + InsertWindowMenu(GetClientWindow(), m_hMenu, + GetHmenuOf(m_windowMenu)); + } } } @@ -692,7 +695,7 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent, else mcs.cy = CW_USEDEFAULT; - DWORD msflags = WS_OVERLAPPED | WS_CLIPCHILDREN; + DWORD msflags = WS_OVERLAPPED | WS_CLIPCHILDREN | WS_THICKFRAME; if (style & wxMINIMIZE_BOX) msflags |= WS_MINIMIZEBOX; if (style & wxMAXIMIZE_BOX) @@ -723,14 +726,6 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent, wxModelessWindows.Append(this); - // Necessary to make ResetWindowStyle() work - // and will be called eventually anyway - Activate(); - - // Without this, a maximized child will still - // a double border around the child - ResetWindowStyle((void *)NULL); // Set the Client ExStyle right - return TRUE; } @@ -1008,6 +1003,8 @@ bool wxMDIChildFrame::HandleMDIActivate(long WXUNUSED(activate), wxActivateEvent event(wxEVT_ACTIVATE, activated, m_windowId); event.SetEventObject( this ); + ResetWindowStyle((void *)NULL); + return GetEventHandler()->ProcessEvent(event); } @@ -1149,7 +1146,9 @@ bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style) ccs.hWindowMenu = (HMENU) parent->GetWindowMenu()->GetHMenu(); ccs.idFirstChild = wxFIRST_MDI_CHILD; - DWORD msStyle = /* MDIS_ALLCHILDSTYLES | */ WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN; + DWORD msStyle = MDIS_ALLCHILDSTYLES | WS_VISIBLE | WS_CHILD | + WS_CLIPCHILDREN | WS_CLIPSIBLINGS; + if ( style & wxHSCROLL ) msStyle |= WS_HSCROLL; if ( style & wxVSCROLL ) @@ -1269,7 +1268,10 @@ static void MDISetMenu(wxWindow *win, HMENU hmenuFrame, HMENU hmenuWindow) wxWindow *parent = win->GetParent(); wxCHECK_RET( parent, wxT("MDI client without parent frame? weird...") ); +#ifndef __WIN16__ ::SendMessage(GetWinHwnd(win), WM_MDIREFRESHMENU, 0, 0L); +#endif + ::DrawMenuBar(GetWinHwnd(parent)); }