# Function Reference

# _WinAPI_LoadCursor

Loads the specified cursor resource from the executable (.exe) file

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

## Parameters

$hInstance | Handle to an instance of the module whose executable file contains the cursor to be loaded.
$sName | The name of the cursor resource or resource identifier to be loaded. To use one of the predefined cursors, the application must set the $hInstance parameter to 0 and the $sName parameter to one of the following values. $OCR_NORMAL ; IDC_ARROW in MSDN $OCR_IBEAM $OCR_WAIT $OCR_CROSS $OCR_UP ; IDC_UPARROW in MSDN $OCR_SIZE $OCR_ICON $OCR_SIZENWSE $OCR_SIZENESW $OCR_SIZEWE $OCR_SIZENS $OCR_SIZEALL $OCR_NO $OCR_HAND $OCR_APPSTARTING $OCR_HELP As $IDC_* are already defined for MouseGetCursor(), $OCR_* have to be used inspite MSDN doc naming.

## Return Value

Success: | Handle to the newly loaded cursor.
Failure: | 0, call _WinAPI_GetLastError() to get extended error information.

## Remarks

This function loads the cursor resource only if it has not been loaded; otherwise, it retrieves the handle to
the existing resource.

## See Also

Search LoadCursor in MSDN Library.