4 START_TEST(DestroyCursorIcon
)
10 ZeroMemory(&iconinfo
, sizeof(iconinfo
));
12 iconinfo
.hbmMask
= CreateBitmap(8, 16, 1, 1, NULL
);
13 ok(iconinfo
.hbmMask
!= NULL
, "\n");
16 * Test if DestroyCursor can destroy an icon, and vice-versa .
19 iconinfo
.fIcon
= TRUE
;
20 hicon
= CreateIconIndirect(&iconinfo
);
21 ok(hicon
!= 0, "should not fail\n");
22 ok(DestroyCursor(hicon
), "\n");
23 ok(!DestroyIcon(hicon
), "\n");
25 iconinfo
.fIcon
= FALSE
;
26 hcursor
= CreateIconIndirect(&iconinfo
);
27 ok(hcursor
!= 0, "should not fail\n");
28 ok(DestroyIcon(hcursor
), "\n");
29 ok(!DestroyCursor(hcursor
), "\n");
32 DeleteObject(iconinfo
.hbmMask
);
34 /* Now check its behaviour regarding Shared icons/cursors */
35 hcursor
= LoadCursor(GetModuleHandle(NULL
), "TESTCURSOR");
36 ok(hcursor
!= 0, "\n");
38 /* MSDN says we shouldn't do that, but it still succeeds */
39 ok(DestroyCursor(hcursor
), "\n");
41 /* In fact, it's still there */
42 ZeroMemory(&iconinfo
, sizeof(iconinfo
));
43 ok(GetIconInfo(hcursor
, &iconinfo
), "\n");
44 ok(iconinfo
.hbmMask
!= NULL
, "\n");
45 ok(iconinfo
.hbmColor
!= NULL
, "\n");
46 ok(!iconinfo
.fIcon
, "\n");
49 DeleteObject(iconinfo
.hbmMask
);
50 DeleteObject(iconinfo
.hbmColor
);