Jump to content

WinSetSysPointerData

From EDM2

This function is specific to OS/2 Version 2.1 or higher. This function sets the given system pointer to the new icon specified by the ICONINFO structure.

Syntax

WinSetSysPointerData(hwndDesktop, iptr, pIconInfo)

Parameters

hwndDesktop (HWND) - Input
Handle to the desktop window.
iptr (ULONG) - Input
Index of the desired system pointer.
pIconInfo (PICONINFO) - In/Out
Icon data.
New icon data for the requested system pointer or NULL to reset the system pointer to its default appearance.

Returns

rc (BOOL) - returns
Success indicator.
TRUE
Successful.
FALSE
An error occurred.

Remarks

This function sets the given system pointer to the new icon specified by the ICONINFO structure that is passed in. Provided that the icon is valid, the screen will be refreshed with the updated system pointer if necessary.

If NULL is passed for the pIconInfo parameter, the operating system reverts back to the default pointer shapes defined by the system. All alterations made using WinSetSysPointerData are persistent. They are preserved across IPLs of the system.

Example Code

#define INCL_WINPOINTERS /* Or use INCL_WIN, INCL_PM, */
#include <os2.h>

HWND         hwndDesktop;  /*  Handle to the desktop window. */
ULONG        iptr;         /*  Index of the desired system pointer. */
PICONINFO    pIconInfo;    /*  Icon data. */
BOOL         rc;           /*  Return value. */

rc = WinSetSysPointerData(hwndDesktop, iptr,
       pIconInfo);

Related Functions