LoadCursorFromFileW function (winuser.h)
Creates a cursor based on data contained in a file.
Примітка
This function has been superseded by the LoadImage function (with LR_DEFAULTSIZE and LR_LOADFROMFILE flags set).
HCURSOR LoadCursorFromFileW(
[in] LPCWSTR lpFileName
);
[in] lpFileName
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.
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. |
Примітка
The winuser.h header defines LoadCursorFromFile as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winuser.h (include Windows.h) |
Library | User32.lib |
DLL | User32.dll |
Conceptual
Reference