]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listctrl.cpp
added version info hidden dialog
[wxWidgets.git] / src / msw / listctrl.cpp
index 8f09f1fcb3b7a6d03b8b1e8933f1a481f735222a..09a988cd15e8ef598952a6a3610043a9d7ab719d 100644 (file)
@@ -19,6 +19,7 @@
 
 #ifdef __GNUG__
     #pragma implementation "listctrl.h"
+    #pragma implementation "listctrlbase.h"
 #endif
 
 // For compilers that support precompilation, includes "wx.h".
@@ -126,7 +127,10 @@ bool wxListCtrl::Create(wxWindow *parent,
                         const wxValidator& validator,
                         const wxString& name)
 {
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif // wxUSE_VALIDATORS
+
     SetName(name);
 
     int x = pos.x;
@@ -1417,9 +1421,16 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
             }
 
             // else translate it into wxEVT_COMMAND_LIST_ITEM_ACTIVATED event
+            // if it happened on an item (and not on empty place)
             {
-                eventType = wxEVT_COMMAND_LIST_ITEM_ACTIVATED;
                 NM_LISTVIEW* hdr = (NM_LISTVIEW*)lParam;
+                if ( hdr->iItem == -1 )
+                {
+                    // not on item
+                    return FALSE;
+                }
+
+                eventType = wxEVT_COMMAND_LIST_ITEM_ACTIVATED;
                 event.m_itemIndex = hdr->iItem;
             }
             break;