diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 3c0675eb7b..e37f779da2 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -1372,7 +1372,11 @@ void wxListCtrl::AssignImageList(wxImageList *imageList, int which) wxSize wxListCtrl::MSWGetBestViewRect(int x, int y) const { - const DWORD rc = ListView_ApproximateViewRect(GetHwnd(), x, y, NO_ITEM); + // Older Platform SDKs lack a cast to WPARAM inside the + // ListView_ApproximateViewRect macro, so cast -1 to + // WPARAM here to suppress a warning about signed/unsigned mismatch. + const DWORD rc = ListView_ApproximateViewRect(GetHwnd(), x, y, + static_cast(-1)); wxSize size(LOWORD(rc), HIWORD(rc));