]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/mdi.cpp
SetSelection(from, to) and SetEditable() implemented
[wxWidgets.git] / src / msw / mdi.cpp
index d33807a73a72108b1e553791b5f138d49d34b407..1e91b0cbcfdf460fa88d17c377ce2f991c40dc27 100644 (file)
@@ -120,10 +120,6 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
 
   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;
@@ -171,7 +167,7 @@ wxMDIParentFrame::~wxMDIParentFrame(void)
 void wxMDIParentFrame::GetClientSize(int *x, int *y) const
 {
   RECT rect;
-  GetClientRect((HWND) GetHWND(), &rect);
+  ::GetClientRect((HWND) GetHWND(), &rect);
 
   int cwidth = rect.right;
   int cheight = rect.bottom;
@@ -516,9 +512,6 @@ bool wxMDIParentFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
      }
     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
     }
     
@@ -529,15 +522,12 @@ bool wxMDIParentFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
     }
     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 (id >= wxFIRST_MDI_CHILD && id <= wxLAST_MDI_CHILD)
   {
-    wxNode* node = GetChildren()->First();
+    wxNode* node = GetChildren().First();
     while (node)
     {
         wxWindow* child = (wxWindow*) node->Data();
@@ -605,8 +595,6 @@ long wxMDIParentFrame::MSWDefWindowProc(WXUINT message, WXWPARAM wParam, WXLPARA
 
 bool wxMDIParentFrame::MSWProcessMessage(WXMSG* msg)
 {
-  MSG *pMsg = (MSG *)msg;
-
   if ((m_currentChild != (wxWindow *)NULL) && (m_currentChild->GetHWND() != (WXHWND) NULL) && m_currentChild->MSWProcessMessage(msg))
      return TRUE;
        
@@ -743,7 +731,7 @@ void wxMDIChildFrame::SetClientSize(int width, int height)
   HWND hWnd = (HWND) GetHWND();
 
   RECT rect;
-  GetClientRect(hWnd, &rect);
+  ::GetClientRect(hWnd, &rect);
 
   RECT rect2;
   GetWindowRect(hWnd, &rect2);
@@ -896,9 +884,6 @@ void wxMDIChildFrame::MSWOnSize(int x, int y, WXUINT id)
 
   if (invalidHandle == (HWND) GetHWND())
   {
-#if WXDEBUG > 1
-  wxDebugMsg("wxMDIChildFrame::OnSize %d: invalid, so returning.\n", GetHWND());
-#endif
     return;
   }
   
@@ -937,9 +922,6 @@ void wxMDIChildFrame::MSWOnSize(int x, int y, WXUINT id)
 
 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())
   {
@@ -998,13 +980,7 @@ long wxMDIChildFrame::MSWOnMDIActivate(long activate, WXHWND WXUNUSED(one), WXHW
 {
   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)
   {
@@ -1014,10 +990,6 @@ long wxMDIChildFrame::MSWOnMDIActivate(long activate, WXHWND WXUNUSED(one), WXHW
     {
       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,
@@ -1047,10 +1019,6 @@ long wxMDIChildFrame::MSWOnMDIActivate(long activate, WXHWND WXUNUSED(one), WXHW
     {
       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,
@@ -1067,10 +1035,6 @@ long wxMDIChildFrame::MSWOnMDIActivate(long activate, WXHWND WXUNUSED(one), WXHW
   wxActivateEvent event(wxEVT_ACTIVATE, flag, m_windowId);
   event.SetEventObject( this );
   GetEventHandler()->ProcessEvent(event);
-
-#if WXDEBUG > 1
-  wxDebugMsg("Finished (de)activating\n");
-#endif
   return 0;
 }
 
@@ -1087,16 +1051,10 @@ void wxMDIChildFrame::MSWDestroyWindow(void)
   // 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;