This topic has not yet been rated - Rate this topic

GetCursor function

Applies to: desktop apps only

Retrieves a handle to the current cursor.

To get information on the global cursor, even if it is not owned by the current thread, use GetCursorInfo.

Syntax

HCURSOR WINAPI GetCursor(void);

Parameters

This function has no parameters.

Return value

Type: HCURSOR

The return value is the handle to the current cursor. If there is no cursor, the return value is NULL.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Reference
GetCursorInfo
SetCursor
Conceptual
Cursors

 

 

Send comments about this topic to Microsoft

Build date: 2/3/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
C# syntax
[DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]
public static extern IntPtr GetCursor();
vb.net syntax
<DllImport("user32.dll", CharSet:=CharSet.Auto, ExactSpelling:=True)> _
Public Shared Function GetCursor() As IntPtr
End Function