Export (0) Print
Expand All

DestroyCursor function

Destroys a cursor and frees any memory the cursor occupied. Do not use this function to destroy a shared cursor.

Syntax


BOOL WINAPI DestroyCursor(
  _In_  HCURSOR hCursor
);

Parameters

hCursor [in]

Type: HCURSOR

A handle to the cursor to be destroyed. The cursor must not be in use.

Return value

Type: BOOL

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The DestroyCursor function destroys a nonshared cursor. Do not use this function to destroy a shared cursor. A shared cursor is valid as long as the module from which it was loaded remains in memory. The following functions obtain a shared cursor:

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Reference
CopyCursor
CopyImage
CreateCursor
LoadCursor
LoadCursorFromFile
LoadImage
Conceptual
Cursors

 

 

Community Additions

ADD
Show:
© 2014 Microsoft