comctl32/listview: Initialize hot cursor handle.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2024-11-13 20:37:59 +01:00 committed by Alexandre Julliard
parent b9c06c4474
commit e5b0ead2b5
Notes: Alexandre Julliard 2024-11-15 22:24:43 +01:00
Approved-by: Zhiyi Zhang (@zhiyi)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6810
2 changed files with 16 additions and 0 deletions

View file

@ -9585,6 +9585,7 @@ static LRESULT LISTVIEW_NCCreate(HWND hwnd, WPARAM wParam, const CREATESTRUCTW *
infoPtr->iVersion = COMCTL32_VERSION; infoPtr->iVersion = COMCTL32_VERSION;
infoPtr->colRectsDirty = FALSE; infoPtr->colRectsDirty = FALSE;
infoPtr->selected_column = -1; infoPtr->selected_column = -1;
infoPtr->hHotCursor = LoadCursorW(NULL, (LPWSTR)IDC_HAND);
/* get default font (icon title) */ /* get default font (icon title) */
SystemParametersInfoW(SPI_GETICONTITLELOGFONT, 0, &logFont, 0); SystemParametersInfoW(SPI_GETICONTITLELOGFONT, 0, &logFont, 0);

View file

@ -7255,6 +7255,19 @@ static void test_LVM_GETNEXTITEM(void)
DestroyWindow(hwnd); DestroyWindow(hwnd);
} }
static void test_LVM_GETHOTCURSOR(void)
{
HCURSOR cursor;
HWND hwnd;
hwnd = create_listview_control(LVS_REPORT);
cursor = (HCURSOR)SendMessageA(hwnd, LVM_GETHOTCURSOR, 0, 0);
ok(!!cursor, "Unexpected cursor %p.\n", cursor);
DestroyWindow(hwnd);
}
START_TEST(listview) START_TEST(listview)
{ {
ULONG_PTR ctx_cookie; ULONG_PTR ctx_cookie;
@ -7322,6 +7335,7 @@ START_TEST(listview)
test_LVM_SETBKIMAGE(FALSE); test_LVM_SETBKIMAGE(FALSE);
test_custom_sort(); test_custom_sort();
test_LVM_GETNEXTITEM(); test_LVM_GETNEXTITEM();
test_LVM_GETHOTCURSOR();
if (!load_v6_module(&ctx_cookie, &hCtx)) if (!load_v6_module(&ctx_cookie, &hCtx))
{ {
@ -7372,6 +7386,7 @@ START_TEST(listview)
test_LVM_GETNEXTITEMINDEX(); test_LVM_GETNEXTITEMINDEX();
test_LVM_GETNEXTITEM(); test_LVM_GETNEXTITEM();
test_LVM_SETBKIMAGE(TRUE); test_LVM_SETBKIMAGE(TRUE);
test_LVM_GETHOTCURSOR();
unload_v6_module(ctx_cookie, hCtx); unload_v6_module(ctx_cookie, hCtx);