m_windowMenu = (WXHMENU) ::LoadMenu(wxGetInstance(), "wxWindowMenu");
-#if WXDEBUG > 1
- wxDebugMsg("Loaded m_windowMenu %d\n", m_windowMenu);
-#endif
-
DWORD msflags = WS_OVERLAPPED ;
if (style & wxMINIMIZE_BOX)
msflags |= WS_MINIMIZEBOX;
}
if (id >= 0xF000)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxMDIFrame::OnCommand %d: system command: calling default window proc\n", GetHWND());
-#endif
return FALSE; // Get WndProc to call default proc
}
}
else if (m_currentChild && (id < wxFIRST_MDI_CHILD || id > wxLAST_MDI_CHILD))
{
-#if WXDEBUG > 1
- wxDebugMsg("wxMDIFrame::MSWOnCommand %d: calling child OnCommand\n", GetHWND());
-#endif
return m_currentChild->MSWOnCommand(id, cmd, control);
}
}
if (invalidHandle == (HWND) GetHWND())
{
-#if WXDEBUG > 1
- wxDebugMsg("wxMDIChildFrame::OnSize %d: invalid, so returning.\n", GetHWND());
-#endif
return;
}
bool wxMDIChildFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxMDIChildFrame::MSWOnCommand %d\n", GetHWND());
-#endif
// if ((cmd == 0) && GetHWND())
if (GetHWND())
{
{
wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent();
HMENU parent_menu = (HMENU) parent->GetWinMenu();
-#if WXDEBUG > 1
- wxDebugMsg("Parent menu is %d\n", parent_menu);
-#endif
HMENU child_menu = (HMENU) GetWinMenu();
-#if WXDEBUG > 1
- wxDebugMsg("Child menu is %d\n", child_menu);
-#endif
if (activate)
{
{
parent->m_parentFrameActive = FALSE;
HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0);
-#if WXDEBUG > 1
- wxDebugMsg("Window submenu is %d\n", subMenu);
-#endif
-// HMENU subMenu = 0;
#ifdef __WIN32__
::SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDISETMENU,
(WPARAM)child_menu,
{
parent->m_parentFrameActive = TRUE;
HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0);
-#if WXDEBUG > 1
- wxDebugMsg("Window submenu is %d\n", subMenu);
-#endif
-// HMENU subMenu = 0;
#ifdef __WIN32__
::SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDISETMENU,
(WPARAM)parent_menu,
wxActivateEvent event(wxEVT_ACTIVATE, flag, m_windowId);
event.SetEventObject( this );
GetEventHandler()->ProcessEvent(event);
-
-#if WXDEBUG > 1
- wxDebugMsg("Finished (de)activating\n");
-#endif
return 0;
}
// destroyed.
HWND oldHandle = (HWND)GetHWND();
-#if WXDEBUG > 1
- wxDebugMsg("*** About to DestroyWindow MDI child %d\n", oldHandle);
-#endif
#ifdef __WIN32__
SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDIDESTROY, (WPARAM)oldHandle, (LPARAM)0);
#else
SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDIDESTROY, (HWND)oldHandle, 0);
-#endif
-#if WXDEBUG > 1
- wxDebugMsg("*** Finished DestroyWindow MDI child %d\n", oldHandle);
#endif
invalidHandle = 0;