From 3103251861c56432cef68d0a9f6263ee0136dc5b Mon Sep 17 00:00:00 2001 From: Andrew Riedi Date: Sun, 9 Dec 2007 23:09:41 -0800 Subject: [PATCH] user32: Test setting a system cursor using a not yet loaded handle. --- dlls/user32/tests/cursoricon.c | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c index e45f38a..fef3039 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -256,6 +256,25 @@ static void test_initial_cursor(void) ok(error == 0xdeadbeef, "Last error: 0x%08x\n", error); } +static void test_unloaded_LoadCursor_handle() +{ + HCURSOR cursor, cursor2; + DWORD error; + + SetLastError(0xdeadbeef); + SetCursor((HCURSOR) 0x00010023); /* Not yet loaded IDC_SIZEALL. */ + error = GetLastError(); + todo_wine { + ok(error == 0xdeadbeef, "Last error: 0x%08x\n", error); + } + + cursor = GetCursor(); + cursor2 = LoadCursor(NULL, IDC_SIZEALL); + todo_wine { + ok(cursor == cursor2, "cursor is not IDC_SIZEALL.\n"); + } +} + static void test_icon_info_dbg(HICON hIcon, UINT exp_cx, UINT exp_cy, UINT exp_bpp, int line) { ICONINFO info; @@ -479,6 +498,7 @@ START_TEST(cursoricon) test_CopyImage_Bitmap(24); test_CopyImage_Bitmap(32); test_initial_cursor(); + test_unloaded_LoadCursor_handle(); test_CreateIcon(); test_DestroyCursor(); } -- 1.4.4.2