LoadCursorFromFile function
Creates a cursor based on data contained in a file.
Syntax
HCURSOR WINAPI LoadCursorFromFile( _In_ LPCTSTR lpFileName );
Parameters
- lpFileName [in]
-
Type: LPCTSTR
The source of the file data to be used to create the cursor. The data in the file must be in either .CUR or .ANI format.
If the high-order word of lpFileName is nonzero, it is a pointer to a string that is a fully qualified name of a file containing cursor data.
Return value
Type: HCURSOR
If the function is successful, the return value is a handle to the new cursor.
If the function fails, the return value is NULL. To get extended error information, call GetLastError. GetLastError may return the following value.
| Return code | Description |
|---|---|
|
The specified file cannot be found. |
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
LoadCursorFromFileW (Unicode) and LoadCursorFromFileA (ANSI) |
See also
- Reference
- LoadCursor
- SetCursor
- SetSystemCursor
- Conceptual
- Cursors