]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listctrl.cpp
Comment out direction aware code for now.
[wxWidgets.git] / src / msw / listctrl.cpp
index e6c810ac1b5a607a62030f781a538d71237e8b69..6bb6ef15278ea985e5dbfe99e72afd4288bd54e9 100644 (file)
@@ -32,9 +32,9 @@
     #include "wx/log.h"
     #include "wx/settings.h"
     #include "wx/dcclient.h"
+    #include "wx/textctrl.h"
 #endif
 
-#include "wx/textctrl.h"
 #include "wx/imaglist.h"
 #include "wx/listctrl.h"
 
@@ -1511,7 +1511,8 @@ long wxListCtrl::FindItem(long start, const wxPoint& pt, int direction)
 
 // Determines which item (if any) is at the specified point,
 // giving details in 'flags' (see wxLIST_HITTEST_... flags above)
-long wxListCtrl::HitTest(const wxPoint& point, int& flags, long *ptrSubItem)
+long
+wxListCtrl::HitTest(const wxPoint& point, int& flags, long *ptrSubItem) const
 {
     LV_HITTESTINFO hitTestInfo;
     hitTestInfo.pt.x = (int) point.x;
@@ -1762,6 +1763,20 @@ bool wxListCtrl::SortItems(wxListCtrlCompare fn, long data)
 // message processing
 // ----------------------------------------------------------------------------
 
+bool wxListCtrl::MSWShouldPreProcessMessage(WXMSG* msg)
+{
+    if ( msg->message == WM_KEYDOWN )
+    {
+        if ( msg->wParam == VK_RETURN )
+        {
+            // we need VK_RETURN to generate wxEVT_COMMAND_LIST_ITEM_ACTIVATED
+            return false;
+        }
+    }
+
+    return wxControl::MSWShouldPreProcessMessage(msg);
+}
+
 bool wxListCtrl::MSWCommand(WXUINT cmd, WXWORD id)
 {
     if (cmd == EN_UPDATE)