X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ecba67d8f19d3e369b7176b0d3f8a074ef120643..4f433feff9251ded00bba26b633f93e660cd44c4:/src/msw/listctrl.cpp?ds=sidebyside diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 5d00e034b4..3769867501 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -56,6 +56,15 @@ // include "properly" #include "wx/msw/wrapcctl.h" +// Currently gcc and watcom don't define NMLVFINDITEM, and DMC only defines +// it by its old name NM_FINDTIEM. +// +#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(NMLVFINDITEM) + #define HAVE_NMLVFINDITEM 1 +#elif defined(__DMC__) || defined(NM_FINDITEM) + #define HAVE_NM_FINDITEM 1 +#endif + // ---------------------------------------------------------------------------- // private functions // ---------------------------------------------------------------------------- @@ -2133,8 +2142,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) } break; -#if 0 -disable temporary for correct building before the missing headers are not completed +#if HAVE_NMLVFINDITEM || HAVE_NM_FINDITEM case LVN_ODFINDITEM: // this message is only used with the virtual list control but // even there we don't want to always use it: in a control with @@ -2143,7 +2151,11 @@ disable temporary for correct building before the missing headers are not comple // application waiting while it performs linear search if ( IsVirtual() && GetItemCount() <= 1000 ) { +#if HAVE_NMLVFINDITEM NMLVFINDITEM* pFindInfo = (NMLVFINDITEM*)lParam; +#else + NM_FINDITEM* pFindInfo = (NM_FINDITEM*)lParam; +#endif // no match by default *result = -1; @@ -2204,7 +2216,7 @@ disable temporary for correct building before the missing headers are not comple processed = false; } break; -#endif +#endif // HAVE_NMLVFINDITEM || HAVE_NM_FINDITEM case LVN_GETDISPINFO: if ( IsVirtual() ) @@ -2278,7 +2290,7 @@ disable temporary for correct building before the missing headers are not comple case LVN_ENDLABELEDITA: case LVN_ENDLABELEDITW: - // logic here is inversed compared to all the other messages + // logic here is inverted compared to all the other messages *result = event.IsAllowed(); // don't keep a stale wxTextCtrl around