判断全局鼠标是哪种系统默认形状。
bool isThisShape(LPCTSTR shape)
{
HCURSOR sysCursor = (HCURSOR)LoadImage(NULL, shape, IMAGE_CURSOR, 0, 0, LR_SHARED);
CURSORINFO ci;
ci.cbSize = sizeof(ci);
GetCursorInfo(&ci);
ICONINFO ii;
GetIconInfo(ci.hCursor, &ii);
HCURSOR cursor = ci.hCursor;
return cursor == sysCursor;
}
例如判断是否手形:isThisShape(IDC_HAND)