Function Reference


Loads a specified icon resource with a client-specified system metric

#include <WinAPIIcons.au3>
_WinAPI_LoadIconMetric ( $hInstance, $sName, $iMetric )


$hInstance Handle to the module of either a DLL or executable (.exe) file that contains the icon to be loaded.
$sName The information about the icon to load. If $hInstance is not 0, $sName specifies the icon resource
either by name or ordinal, otherwise, $sName specifies either the name of a standalone icon (.ico)
file or the identifier of a predefined icon to load.
$iMetric The desired metric. It can be one of the following values.

Return Value

Success: The icon handle.
Failure: 0 and sets the @error flag to non-zero, @extended flag may contain the HRESULT error code.


When you are finished using the icon, destroy it using the _WinAPI_DestroyIcon() function.

This function requires Windows Vista or later.



See Also

Search LoadIconMetric in MSDN Library.