UDF > WinAPIEx > Menus & Resources > Icons >


_WinAPI_GetIconDimension

Obtient les dimensions de l'icône spécifiée

#include <WinAPIIcons.au3>
_WinAPI_GetIconDimension ( $hIcon )

Paramètre

$hIcon Handle de l'icône dont vous voulez les dimensions.

Valeur de retour

Succès: Retourne la structure $tagSIZE qui contient la taille de l'icône, en pixels.
Échec: Définit @error <> 0, appelez _WinAPI_GetLastError() pour obtenir des informations sur l'erreur.

Exemple

#include <WinAPIIcons.au3>
#include <WinAPIShellEx.au3>

Local $hIcon = _WinAPI_ShellExtractIcon(@SystemDir & '\shell32.dll', 130, 48, 48)
Local $tSIZE = _WinAPI_GetIconDimension($hIcon)
_WinAPI_DestroyIcon($hIcon)

ConsoleWrite(DllStructGetData($tSIZE, 'X') & ' x ' & DllStructGetData($tSIZE, 'Y') & @CRLF)