Retrieves information about the specified icon or cursor
#include <WinAPIIcons.au3>
_WinAPI_GetIconInfo ( $hIcon )
$hIcon | Handle to the icon or cursor. To retrieve information on a standard icon or cursor, specify one of the following values: $OCR_APPSTARTING - Standard arrow and small hourglass cursor $OCR_NORMAL - Standard arrow cursor ; IDC_ARROW in MSDN $OCR_CROSS - Crosshair cursor $OCR_HAND - Hand cursor $OCR_HELP - Arrow and question mark cursor $OCR_IBEAM - I-beam cursor $OCR_NO - Slashed circle cursor $OCR_SIZEALL - Four-pointed arrow cursor $OCR_SIZENESW - Double-pointed arrow cursor pointing NE and SW $OCR_SIZENS - Double-pointed arrow cursor pointing N and S $OCR_SIZENWSE - Double-pointed arrow cursor pointing NW and SE $OCR_SIZEWE - Double-pointed arrow cursor pointing W and E $OCR_UP - Vertical arrow cursor ; IDC_UPARROW in MSDN $OCR_WAIT - Hourglass cursor As $IDC_* are already defined for MouseGetCursor(), $OCR_* have to be used inspite MSDN doc naming. $IDI_APPLICATION - Application icon $IDI_ASTERISK - Asterisk icon $IDI_EXCLAMATION - Exclamation point icon $IDI_HAND - Stop sign icon $IDI_QUESTION - Question-mark icon $IDI_WINLOGO - Windows logo icon |
Success: | Array with the following format: $aIcon[0] - True $aIcon[1] - True specifies an icon, False specifies a cursor $aIcon[2] - Specifies the X coordinate of a cursor's hot spot $aIcon[3] - Specifies the Y coordinate of a cursor's hot spot $aIcon[4] - Specifies the icon bitmask bitmap $aIcon[5] - Handle to the icon color bitmap |
Failure: | Sets the @error flag to non-zero, call _WinAPI_GetLastError() to get extended error information |
This function creates bitmaps for the bitmask and color members.
You must manage these bitmaps and delete them when they are no longer necessary.
Search GetIconInfo in MSDN Library.
#include <MsgBoxConstants.au3>
#include <WinAPIIcons.au3>
Example()
Func Example()
Local $aInfo, $sInfo = ""
$aInfo = _WinAPI_GetIconInfo($IDC_WAIT)
For $x = 0 To UBound($aInfo) - 1
$sInfo &= $aInfo[$x] & @CRLF
Next
MsgBox($MB_SYSTEMMODAL, "Icon", "Get Icon Info: " & @CRLF & $sInfo)
EndFunc ;==>Example