m_currentChild = NULL;
m_windowMenu = 0;
m_parentFrameActive = TRUE;
- m_frameToolBar = NULL ;
}
bool wxMDIParentFrame::Create(wxWindow *parent,
{
m_defaultIcon = (WXHICON) (wxSTD_MDIPARENTFRAME_ICON ? wxSTD_MDIPARENTFRAME_ICON : wxDEFAULT_MDIPARENTFRAME_ICON);
- m_frameToolBar = NULL ;
m_clientWindow = NULL;
m_currentChild = NULL;
m_windowMenu = 0;
m_windowMenu = (WXHMENU) ::LoadMenu(wxGetInstance(), "wxWindowMenu");
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("Loaded m_windowMenu %d\n", m_windowMenu);
#endif
void wxMDIParentFrame::MSWOnCreate(WXLPCREATESTRUCT WXUNUSED(cs))
{
- m_clientWindow = new wxMDIClientWindow;
+ m_clientWindow = OnCreateClient();
// Uses own style for client style
m_clientWindow->CreateClient(this, GetWindowStyleFlag());
}
}
if (id >= 0xF000)
{
-#if DEBUG > 1
+#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 DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("wxMDIFrame::MSWOnCommand %d: calling child OnCommand\n", GetHWND());
#endif
return m_currentChild->MSWOnCommand(id, cmd, control);
return TRUE;
if (m_acceleratorTable != (WXHANDLE) NULL &&
- ::TranslateAccelerator((HWND) GetHWND(), (HANDLE) m_acceleratorTable, pMsg))
+ ::TranslateAccelerator((HWND) GetHWND(), (HACCEL) m_acceleratorTable, pMsg))
return TRUE;
if (pMsg->message == WM_KEYDOWN || pMsg->message == WM_SYSKEYDOWN)
wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent();
parent->m_parentFrameActive = FALSE;
- HMENU subMenu = GetSubMenu((HWND) parent->GetWindowMenu(), 0);
+ HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0);
// Try to insert Window menu in front of Help, otherwise append it.
int N = GetMenuItemCount(menu);
if (invalidHandle == (HWND) GetHWND())
{
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("wxMDIChildFrame::OnSize %d: invalid, so returning.\n", GetHWND());
#endif
return;
bool wxMDIChildFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
{
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("wxMDIChildFrame::MSWOnCommand %d\n", GetHWND());
#endif
if ((cmd == 0) && GetHWND())
{
wxFrame *parent = (wxFrame *)GetParent();
HWND parent_hwnd = (HWND) parent->GetHWND();
- return (::TranslateAccelerator(parent_hwnd, (HANDLE) m_acceleratorTable, pMsg) != 0);
+ return (::TranslateAccelerator(parent_hwnd, (HACCEL) m_acceleratorTable, pMsg) != 0);
}
return FALSE;
}
{
wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent();
HMENU parent_menu = (HMENU) parent->GetWinMenu();
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("Parent menu is %d\n", parent_menu);
#endif
HMENU child_menu = (HMENU) GetWinMenu();
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("Child menu is %d\n", child_menu);
#endif
{
parent->m_parentFrameActive = FALSE;
HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0);
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("Window submenu is %d\n", subMenu);
#endif
// HMENU subMenu = 0;
{
parent->m_parentFrameActive = TRUE;
HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0);
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("Window submenu is %d\n", subMenu);
#endif
// HMENU subMenu = 0;
event.SetEventObject( this );
GetEventHandler()->ProcessEvent(event);
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("Finished (de)activating\n");
#endif
return 0;
// destroyed.
HWND oldHandle = (HWND)GetHWND();
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("*** About to DestroyWindow MDI child %d\n", oldHandle);
#endif
#ifdef __WIN32__
#else
SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDIDESTROY, (HWND)oldHandle, 0);
#endif
-#if DEBUG > 1
+#if WXDEBUG > 1
wxDebugMsg("*** Finished DestroyWindow MDI child %d\n", oldHandle);
#endif
invalidHandle = 0;