]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listctrl.cpp
non-pch build fix
[wxWidgets.git] / src / msw / listctrl.cpp
index 1f67a95bbcd4ba03ae37bf88760a882e87d8440e..1ba0251cdf195fb76f1b1c5b3b0307ce33ffcf04 100644 (file)
@@ -1806,17 +1806,14 @@ bool wxListCtrl::MSWShouldPreProcessMessage(WXMSG* msg)
 {
     if ( msg->message == WM_KEYDOWN )
     {
-        if ( msg->wParam == VK_RETURN )
+        // Only eat VK_RETURN if not being used by the application in
+        // conjunction with modifiers
+        if ( msg->wParam == VK_RETURN && !wxIsAnyModifierDown() )
         {
-            // We need VK_RETURN to generate wxEVT_COMMAND_LIST_ITEM_ACTIVATED,
-            // but only if none of the modifiers is down.  We'll let normal
-            // accelerators handle those.
-            if ( !wxIsCtrlDown() && !wxIsCtrlDown() &&
-                 !((HIWORD(msg->lParam) & KF_ALTDOWN) == KF_ALTDOWN))
+            // we need VK_RETURN to generate wxEVT_COMMAND_LIST_ITEM_ACTIVATED
             return false;
         }
     }
-
     return wxControl::MSWShouldPreProcessMessage(msg);
 }
 
@@ -2149,7 +2146,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
                             // focus event from here and the selection one
                             // below
                             event.SetEventType(eventType);
-                            (void)GetEventHandler()->ProcessEvent(event);
+                            (void)HandleWindowEvent(event);
                         }
                         else // no focus event to send
                         {
@@ -2421,7 +2418,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
 
     event.SetEventType(eventType);
 
-    bool processed = GetEventHandler()->ProcessEvent(event);
+    bool processed = HandleWindowEvent(event);
 
     // post processing
     // ---------------
@@ -2824,8 +2821,10 @@ void wxListCtrl::OnPaint(wxPaintEvent& event)
 
             int numCols = GetColumnCount();
             int* indexArray = new int[numCols];
-            BOOL rv = ListView_GetColumnOrderArray( GetHwnd(), numCols, indexArray );
-            wxASSERT_MSG( rv == TRUE, _T("invalid column index array in OnPaint()") );
+            if ( !ListView_GetColumnOrderArray( GetHwnd(), numCols, indexArray) )
+            {
+                wxFAIL_MSG( _T("invalid column index array in OnPaint()") );
+            }
 
             int x = itemRect.GetX();
             for (int col = 0; col < numCols; col++)