]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/treectrl.cpp
Use string.h instead of memory.h, since some system don't have memory.h and
[wxWidgets.git] / src / msw / treectrl.cpp
index ef013be6f74d82d57b40e2d62af0e14d04b86d26..4aa5c5ec8f3894b7441539d745c013103d8d4e59 100644 (file)
@@ -293,7 +293,7 @@ class wxTreeItemParam
 {
 public:
     wxTreeItemParam()
-        : m_item(NULL),
+        : m_item((long int)0),
           m_data(NULL)
     {
         for ( size_t n = 0; n < WXSIZEOF(m_images); n++ )
@@ -1985,6 +1985,20 @@ void wxTreeCtrl::SortChildren(const wxTreeItemId& item)
 // implementation
 // ----------------------------------------------------------------------------
 
+bool wxTreeCtrl::MSWShouldPreProcessMessage(WXMSG* msg)
+{
+    if ( msg->message == WM_KEYDOWN )
+    {
+        if ( msg->wParam == VK_RETURN )
+        {
+            // we need VK_RETURN to generate wxEVT_COMMAND_TREE_ITEM_ACTIVATED
+            return false;
+        }
+    }
+
+    return wxTreeCtrlBase::MSWShouldPreProcessMessage(msg);
+}
+
 bool wxTreeCtrl::MSWCommand(WXUINT cmd, WXWORD id)
 {
     if ( cmd == EN_UPDATE )