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