X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d699f48ba33c96c24f7ab3764ad98ded0633c1c5..8f974c520a8733158591891458fda10fae4c3950:/src/msw/listctrl.cpp?ds=inline diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index c974aaf47f..5b030dd304 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -123,6 +123,7 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_ACTIVATED) DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_CACHE_HINT) IMPLEMENT_DYNAMIC_CLASS(wxListCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxListView, wxListCtrl) IMPLEMENT_DYNAMIC_CLASS(wxListItem, wxObject) BEGIN_EVENT_TABLE(wxListCtrl, wxControl) @@ -480,20 +481,19 @@ long wxListCtrl::ConvertToMSWStyle(long& oldStyle, long style) const wstyle |= LVS_SORTDESCENDING; } +#if !( defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 1, 0 ) ) 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."), + wxLogWarning(_("Please install a newer version of comctl32.dll\n(at least version 4.70 is required but you have %d.%02d)\nor this program won't operate correctly."), ver / 100, ver % 100); } wstyle |= LVS_OWNERDATA; } +#endif return wstyle; } @@ -1625,7 +1625,8 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) break; #endif // 0 -#if defined(_WIN32_IE) && _WIN32_IE >= 0x300 +#if defined(_WIN32_IE) && _WIN32_IE >= 0x300 \ + && !( defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 1, 0 ) ) case NM_CUSTOMDRAW: *result = OnCustomDraw(lParam); @@ -1927,10 +1928,14 @@ void wxListCtrl::RefreshItem(long item) void wxListCtrl::RefreshItems(long itemFrom, long itemTo) { - for ( long item = itemFrom; item <= itemTo; item++ ) - { - RefreshItem(item); - } + wxRect rect1, rect2; + GetItemRect(itemFrom, rect1); + GetItemRect(itemTo, rect2); + + wxRect rect = rect1; + rect.height = rect2.GetBottom() - rect1.GetTop(); + + RefreshRect(rect); } // ----------------------------------------------------------------------------