X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7c46a16b62eb3dad2118c297b5b2b47ba0487fdf..8705ab68e24210788b3c7482f8f9bfe4badd839f:/src/msw/mdi.cpp diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 1d295a13dc..41e02c6b1b 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -43,6 +43,8 @@ #include "wx/log.h" #endif +#if wxUSE_MDI_ARCHITECTURE && !defined(__WXUNIVERSAL__) + #include "wx/mdi.h" #include "wx/msw/private.h" @@ -82,6 +84,7 @@ static const int IDM_WINDOWCASCADE = 4002; static const int IDM_WINDOWICONS = 4003; static const int IDM_WINDOWNEXT = 4004; static const int IDM_WINDOWTILEVERT = 4005; +static const int IDM_WINDOWPREV = 4006; // This range gives a maximum of 500 MDI children. Should be enough :-) static const int wxFIRST_MDI_CHILD = 4100; @@ -188,6 +191,7 @@ bool wxMDIParentFrame::Create(wxWindow *parent, m_windowMenu->AppendSeparator(); m_windowMenu->Append(IDM_WINDOWICONS, _("&Arrange Icons")); m_windowMenu->Append(IDM_WINDOWNEXT, _("&Next")); + m_windowMenu->Append(IDM_WINDOWPREV, _("&Previous")); } m_parentFrameActive = TRUE; @@ -500,6 +504,7 @@ bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd) // is it one of standard MDI commands? WXWPARAM wParam = 0; + WXLPARAM lParam = 0; int msg; switch ( id ) { @@ -525,6 +530,12 @@ bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd) case IDM_WINDOWNEXT: msg = WM_MDINEXT; + lParam = 0; // next child + break; + + case IDM_WINDOWPREV: + msg = WM_MDINEXT; + lParam = 1; // previous child break; default: @@ -533,7 +544,7 @@ bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd) if ( msg ) { - ::SendMessage(GetWinHwnd(GetClientWindow()), msg, wParam, 0); + ::SendMessage(GetWinHwnd(GetClientWindow()), msg, wParam, lParam); return TRUE; } @@ -1378,3 +1389,7 @@ static void UnpackMDIActivate(WXWPARAM wParam, WXLPARAM lParam, *hwndDeact = (WXHWND)HIWORD(lParam); #endif // Win32/Win16 } + +#endif +// wxUSE_MDI_ARCHITECTURE && !defined(__WXUNIVERSAL__) +