Jump to content

WinDestroyCursor

From EDM2
Revision as of 19:50, 12 April 2024 by Ak120 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function destroys the current cursor, if it belongs to the specified window.

Syntax

WinDestroyCursor(hwnd)

Parameters

hwnd (HWND) - input
Window handle to which the cursor belongs.

Returns

rc (BOOL) - returns
Success indicator.
TRUE - Successful completion
FALSE - Error occurred.

Errors

Possible returns from WinGetLastError

PMERR_INVALID_HWND (0x1001)
An invalid window handle was specified.

Remarks

This function has no effect if the current cursor does not belong to the specified window.

It is not necessary to call this function before calling the WinCreateCursor function.

If the cursor was created with the CURSOR_FLASH option, then the TID_CURSOR timer is also destroyed.

Example Code

This example destroys the cursor defined for the specified input window.

#define INCL_WINCURSORS         /* Window Cursor Functions      */
#include <os2.h>

BOOL  fSuccess;         /* success indicator                    */
HWND    hwnd;           /* cursor display window                */

fSuccess = WinDestroyCursor(hwnd);

Related Functions