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