]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
Added chapter on collection and container classes to contents
[wxWidgets.git] / src / msw / window.cpp
index 635b50885cae8f482d5ad5414ef113b20c781773..98979b04660880077e5f67aef60d074f4b429bac 100644 (file)
@@ -990,7 +990,13 @@ void wxWindow::OnIdle(wxIdleEvent& event)
                 state |= MK_SHIFT;
             if ( wxIsCtrlDown() )
                 state |= MK_CONTROL;
-
+            if ( GetKeyState( VK_LBUTTON ) )
+                state |= MK_LBUTTON;
+            if ( GetKeyState( VK_MBUTTON ) )
+                state |= MK_MBUTTON;
+            if ( GetKeyState( VK_RBUTTON ) )
+                state |= MK_RBUTTON;
+  
             wxMouseEvent event(wxEVT_LEAVE_WINDOW);
             InitMouseEvent(event, pt.x, pt.y, state);
 
@@ -2760,11 +2766,9 @@ bool wxWindow::HandleSetCursor(WXHWND hWnd,
         // cursor set, stop here
         return TRUE;
     }
-    else
-    {
-        // pass up the window chain
-        return FALSE;
-    }
+
+    // pass up the window chain
+    return FALSE;
 }
 
 // ---------------------------------------------------------------------------
@@ -2946,6 +2950,16 @@ bool wxWindow::HandlePaint()
     return GetEventHandler()->ProcessEvent(event);
 }
 
+// Can be called from an application's OnPaint handler
+void wxWindow::OnPaint(wxPaintEvent& event)
+{
+    HDC hDC = (HDC) wxPaintDC::FindDCInCache((wxWindow*) event.GetEventObject());
+    if (hDC != 0)
+    {
+        MSWDefWindowProc(WM_PAINT, (WPARAM) hDC, 0);
+    }
+}
+
 bool wxWindow::HandleEraseBkgnd(WXHDC hdc)
 {
     // Prevents flicker when dragging