Jump to content

WinQuerySysPointerData: Difference between revisions

From EDM2
Created page with "This function ''returns the icon data for the specified system pointer for application use''. This function is specific to OS/2 Version 2.1 or higher. ==Syntax== WinQuerySysPointerData(hwndDesktop, iptr, pIconInfo) ==Parameters== ;hwndDesktop (HWND) - Input : Handle to the desktop window. ;iptr (ULONG) - Input : The index of the desired system pointer. : Possible values are in the following list: :;SPTR_ARROW :: Arrow pointer :;SPTR_TEXT :: Text I-beam point..."
 
Line 89: Line 89:
* [[WinQueryPointerPos]]
* [[WinQueryPointerPos]]
* [[WinQuerySysPointer]]
* [[WinQuerySysPointer]]
* [[WinQuerySysPointerData]]
* [[WinSetPointer]]
* [[WinSetPointer]]
* [[WinSetPointerPos]]
* [[WinSetPointerPos]]

Revision as of 03:27, 9 April 2025

This function returns the icon data for the specified system pointer for application use. This function is specific to OS/2 Version 2.1 or higher.

Syntax

WinQuerySysPointerData(hwndDesktop, iptr, pIconInfo)

Parameters

hwndDesktop (HWND) - Input
Handle to the desktop window.
iptr (ULONG) - Input
The index of the desired system pointer.
Possible values are in the following list:
SPTR_ARROW
Arrow pointer
SPTR_TEXT
Text I-beam pointer
SPTR_WAIT
Wait icon pointer
SPTR_MOVE
Move pointer
SPTR_SIZENWSE
Downward-sloping, double-headed arrow pointer
SPTR_SIZENESW
Upward-sloping, double-headed arrow pointer
SPTR_SIZEWE
Horizontal, double-headed arrow pointer
SPTR_SIZENS
Vertical, double-headed arrow pointer
SPTR_APPICON
Standard application icon pointer
SPTR_ICONINFORMATION
Information icon pointer
SPTR_ICONQUESICON
Question mark icon pointer
SPTR_ICONERROR
Exclamation mark icon pointer
SPTR_ICONWARNING
Warning icon pointer
SPTR_ILLEGAL
Illegal operation icon pointer
SPTR_FILE
Single file icon pointer
SPTR_MULTFILE
Multiple files icon pointer
SPTR_FOLDER
Folder icon pointer
SPTR_PROGRAM
Application program icon pointer
pIconInfo (PICONINFO) - In/Out
Icon data buffer.
The pointer to the buffer the icon data is to be written into. The buffer should be large enough to accommodate the icon data.

Returns

rc (BOOL) - returns
Return value.
TRUE
Successful
FALSE
An error occurred.

Remarks

The icon data is always returned in ICON_DATA format. The buffer supplied in IconInfo must be large enough to accommodate the icon data. If the buffer size provided is 0 or not large enough, the actual buffer size needed is returned in the ICONINFO structure.

Errors

Possible returns from WinGetLastError: (No specific errors were listed in the provided text.)

Example Code

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

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

rc = WinQuerySysPointerData(hwndDesktop, iptr, pIconInfo);

Related Functions