diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 9b0c6faea9..bb398e715e 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -247,7 +247,8 @@ static HTREEITEM GetItemFromPoint(HWND hwndTV, int x, int y) tvht.pt.x = x; tvht.pt.y = y; - return TreeView_HitTest(hwndTV, &tvht); + // TreeView_HitTest() doesn't do the right cast in mingw32 headers + return (HTREEITEM)TreeView_HitTest(hwndTV, &tvht); } // ----------------------------------------------------------------------------