]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
Turned wxIcon inline constructors to real constructors
[wxWidgets.git] / src / msw / window.cpp
index 5abe05b464753c04816f489c990cdf71cdbaa9ca..490d7d03273b887bbc3c55a6de9949238c4400b0 100644 (file)
@@ -1031,10 +1031,19 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
           break;
         }
 
+        case WM_MOVE:
+          {
+            wxMoveEvent event(wxPoint(LOWORD(lParam), HIWORD(lParam)),
+                              m_windowId);
+            event.SetEventObject(this);
+            if ( !GetEventHandler()->ProcessEvent(event) )
+              Default();
+          }
+          break;
+
         case WM_WINDOWPOSCHANGING:
         {
-          WINDOWPOS *pos = (WINDOWPOS *)lParam;
-          MSWOnWindowPosChanging((void *)pos);
+          MSWOnWindowPosChanging((void *)lParam);
           break;
         }
 
@@ -2052,7 +2061,7 @@ void wxWindow::MSWOnWindowPosChanging(void *WXUNUSED(lpPos))
 }
 
 // Deal with child commands from buttons etc.
-bool wxWindow::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND WXUNUSED(control))
+bool wxWindow::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
 {
 #if WXDEBUG > 1
   wxDebugMsg("wxWindow::MSWOnCommand\n");
@@ -2084,27 +2093,11 @@ bool wxWindow::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND WXUNUSED(control))
   }
   else
   {
-#if WXDEBUG > 1
-    wxDebugMsg("Could not find item!\n");
-    char buf[100];
-    wxDebugMsg("Item ids for this panel:\n");
-
-    wxNode *current = GetChildren()->First();
-    while (current)
-    {
-      wxObject *obj = (wxObject *)current->Data() ;
-      if (obj->IsKindOf(CLASSINFO(wxControl)))
-      {
-        wxControl *item = (wxControl *)current->Data();
-        sprintf(buf, "  %d\n", (int)item->m_windowId);
-        wxDebugMsg(buf);
-      }
-      current = current->Next();  
-    }
-    wxYield();
-#endif
-    return FALSE;
+    wxWindow *win = wxFindWinFromHandle(control);
+    if (win)
+      return win->MSWCommand(cmd, id);
   }
+  return FALSE;
 }
 
 long wxWindow::MSWOnSysCommand(WXWPARAM wParam, WXLPARAM lParam)