Jump to content

WinDestroyCursor: Difference between revisions

From EDM2
Created page with "This function destroys the current cursor, if it belongs to the specified window. ==Syntax== WinDestroyCursor(hwnd); ==Parameters== ; hwnd (HWND) - input :Window handle t..."
(No difference)

Revision as of 00:30, 7 April 2024

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);

Definition


#define INCL_WINCURSORS /* Or use INCL_WIN, INCL_PM, Also in COMMON section */
#include <os2.h>

HWND    hwnd;  /*  Window handle to which the cursor belongs. */
BOOL    rc;    /*  Success indicator. */

rc = WinDestroyCursor(hwnd);

Related Functions