]> git.saurik.com Git - wxWidgets.git/commitdiff
check for LVS_OWNERDATA availability at compile and run-time
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Jul 2001 00:39:05 +0000 (00:39 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Jul 2001 00:39:05 +0000 (00:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/listctrl.cpp

index 191b98c91a71827c5993e10fb7cdb7399e83c96e..8b410d17ea3575c9ea5f6e17286aa85fc08830f0 100644 (file)
     #define LVS_EX_FULLROWSELECT 0x00000020
 #endif
 
+#ifndef LVS_OWNERDATA
+    #define LVS_OWNERDATA 0x1000
+#endif
+
 // ----------------------------------------------------------------------------
 // private functions
 // ----------------------------------------------------------------------------
@@ -452,6 +456,16 @@ long wxListCtrl::ConvertToMSWStyle(long& oldStyle, long style) const
 
     if ( style & wxLC_VIRTUAL )
     {
+        int ver = wxTheApp->GetComCtl32Version();
+        if ( ver < 470 )
+        {
+            wxLogWarning(_("Please install a newer version of comctl32.dll\n"
+                           "(at least version 4.70 is required but you have "
+                           "%d.%02d)\n"
+                           "or this program won't operate correctly."),
+                        ver / 100, ver % 100);
+        }
+
         wstyle |= LVS_OWNERDATA;
     }