]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listctrl.cpp
making things compile and build again ...
[wxWidgets.git] / src / msw / listctrl.cpp
index 65fb65b7d0f825b0eec7767840ed9f9aab3b3ca3..b24838183283226dc834cf0cca3388f441774096 100644 (file)
@@ -1749,8 +1749,9 @@ bool wxListCtrl::MSWShouldPreProcessMessage(WXMSG* msg)
     return wxControl::MSWShouldPreProcessMessage(msg);
 }
 
-bool wxListCtrl::MSWCommand(WXUINT cmd, WXWORD id)
+bool wxListCtrl::MSWCommand(WXUINT cmd, WXWORD id_)
 {
+    const int id = (signed short)id_;
     if (cmd == EN_UPDATE)
     {
         wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, id);
@@ -2847,30 +2848,12 @@ void wxListCtrl::SetItemCount(long count)
 
 void wxListCtrl::RefreshItem(long item)
 {
-    // strangely enough, ListView_Update() results in much more flicker here
-    // than a dumb Refresh() -- why?
-#if 0
-    if ( !ListView_Update(GetHwnd(), item) )
-    {
-        wxLogLastError(_T("ListView_Update"));
-    }
-#else // 1
-    wxRect rect;
-    GetItemRect(item, rect);
-    RefreshRect(rect);
-#endif // 0/1
+    RefreshItems(item, item);
 }
 
 void wxListCtrl::RefreshItems(long itemFrom, long itemTo)
 {
-    wxRect rect1, rect2;
-    GetItemRect(itemFrom, rect1);
-    GetItemRect(itemTo, rect2);
-
-    wxRect rect = rect1;
-    rect.height = rect2.GetBottom() - rect1.GetTop();
-
-    RefreshRect(rect);
+    ListView_RedrawItems(GetHwnd(), itemFrom, itemTo);
 }
 
 // ----------------------------------------------------------------------------