How do I know the size of a HCURSOR object

前端 未结 3 493
無奈伤痛
無奈伤痛 2021-01-22 13:46

I want to get the height and width of a .cur file without look into its format.

I try to use LoadCursorFromFile() to get a HCURSOR, I suppose there is a API function to

3条回答
  •  -上瘾入骨i
    2021-01-22 14:24

    From MSDN:

    The nWidth and nHeight parameters must specify a width and height that are supported by the current display driver, because the system cannot create cursors of other sizes. To determine the width and height supported by the display driver, use the GetSystemMetrics function, specifying the SM_CXCURSOR or SM_CYCURSOR value.

提交回复
热议问题