###User Defined Function###
_WinAPI_RegisterHotKey

###Description###
Defines a system-wide hot key.

###Syntax###
#include <WinAPISys.au3>
_WinAPI_RegisterHotKey ( $hWnd, $ID, $iModifiers, $vKey )


###Parameters###
@@ParamTable@@
$hWnd
	Handle to the window that will receive WM_HOTKEY messages generated by the hot key. If this parameter
	is 0, WM_HOTKEY messages are posted to the message queue of the calling thread and must be processed in
	the message loop.
$ID
	Specifies the identifier of the hot key. An application must specify an id value in the range
	0x0000 through 0xBFFF.
$iModifiers
	Specifies keys that must be pressed in combination with the key specified by the $vKey parameter
	in order to generate the WM_HOTKEY message.
	The $iModifiers parameter can be a combination of the following values.
	$MOD_ALT
	$MOD_CONTROL
	$MOD_SHIFT
	$MOD_WIN

	Windows 7 or later
	$MOD_NOREPEAT
$vKey
	Specifies the virtual-key code of the hot key ($VK_*).
@@End@@

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


###Remarks###
When a key is pressed, the system looks for a match against all hot keys. Upon finding a match, the system posts
the WM_HOTKEY message to the message queue of the window with which the hot key is associated. If the hot key is
not associated with a window, then the WM_HOTKEY message is posted to the thread associated with the hot key.

_WinAPI_RegisterHotKey() fails if the keystrokes specified for the hot key have already been registered by
another hot key.

In Windows XP, if a hot key already exists with the same $hWnd and $ID parameters,
it is replaced by the new hot key.

In Windows Vista and subsequent versions of Windows, if a hot key already exists with the same $hWnd and $ID
parameters, it is maintained along with the new hot key. In these versions of Windows, the application must
explicitly call _WinAPI_UnregisterHotKey() to unregister the old hot key.


###Related###
_WinAPI_UnregisterHotKey


###See Also###
@@MsdnLink@@ RegisterHotKey


###Example###
@@IncludeExample@@
