###User Defined Function###
_WinAPI_LoadIcon

###Description###
Loads the specified icon resource from the executable (.exe) file associated with an application instance.

###Syntax###
#include <WinAPIRes.au3>
_WinAPI_LoadIcon ( $hInstance, $sName )


###Parameters###
@@ParamTable@@
$hInstance
	A handle to an instance of the module whose executable file contains the icon to be loaded.
$sName
	The name of the icon resource to be loaded. Alternatively, if $hInstance is 0, it can be
	one of the following predefined values.
	$IDI_APPLICATION
	$IDI_HAND
	$IDI_QUESTION
	$IDI_EXCLAMATION
	$IDI_ASTERISK
	$IDI_WINLOGO
	$IDI_SHIELD
	$IDI_ERROR
	$IDI_INFORMATION
	$IDI_WARNING
@@End@@

###ReturnValue###
@@ReturnTable@@
Success 	The icon handle.
Failure 	0, call <a href="_WinAPI_GetLastError.htm">_WinAPI_GetLastError()</a> to get extended error information.
@@End@@


###Remarks###
_WinAPI_LoadIcon() loads the icon resource only if it has not been loaded; otherwise, it retrieves a
handle to the existing resource.

_WinAPI_LoadIcon() can only load an icon whose size conforms to the $SM_CXICON and $SM_CYICON system metric
values. Use the _WinAPI_LoadImage() function to load icons of other sizes.

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


###Related###
_WinAPI_LoadImage, _WinAPI_DestroyIcon


###See Also###
@@MsdnLink@@ LoadIcon
