]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for my old mingw32 cross-compiler
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 20 Nov 2001 15:36:28 +0000 (15:36 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 20 Nov 2001 15:36:28 +0000 (15:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/listctrl.cpp

index 13d2bff72e53d35568bd061f698b7d948673dd66..597e46e504b7a14a4c7082931ba30ce16b8c82b1 100644 (file)
@@ -1492,6 +1492,11 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
 
     NMHDR *nmhdr = (NMHDR *)lParam;
 
+    // if your compiler is as broken as this, you should really change it: this
+    // code is needed for normal operation! #ifdef below is only useful for
+    // automatic rebuilds which are done with a very old compiler version
+#ifdef LVM_FIRST
+
     // check for messages from the header (in report view)
     HWND hwndHdr = ListView_GetHeader(GetHwnd());
 
@@ -1573,7 +1578,9 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
                 return wxControl::MSWOnNotify(idCtrl, lParam, result);
         }
     }
-    else if ( nmhdr->hwndFrom == GetHwnd() )
+    else
+#endif // defined(LVM_FIRST)
+        if ( nmhdr->hwndFrom == GetHwnd() )
     {
         // almost all messages use NM_LISTVIEW
         NM_LISTVIEW *nmLV = (NM_LISTVIEW *)nmhdr;