Prototypes for SetSystemCursor() & LoadCursorFromFile()

Last reviewed: September 29, 1995
Article ID: Q122564
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows NT version 3.5
    

SUMMARY

The function prototypes for SetSystemCursor() and LoadCursorFromFile() were inadvertently omitted from the Win32 SDK header files. These APIs are resolved by linking for USER32.LIB.

Additionally, the use of the OCR_* constants as described in the online help for LoadCursorFromFile() is not currently implemented. However, this functionality is available through LoadCursor().

MORE INFORMATION

The correct function prototypes are given below. NOTE: These prototypes were included correctly in the Win32 SDK 3.51/4.0 documentation.

To use these functions, add the prototypes to a file in your project after including WINDOWS.H.

#ifdef __cplusplus extern "C" { #endif /* __cplusplus */

/* SetSystemCursor prototype */
WINUSERAPI BOOL WINAPI SetSystemCursor (HCURSOR hcur, DWORD id);

/* LoadCursorFromFile prototypes - UNICODE aware */
WINUSERAPI HCURSOR WINAPI LoadCursorFromFileA (LPCSTR lpFileName); WINUSERAPI HCURSOR WINAPI LoadCursorFromFileW (LPCWSTR lpFileName);

#ifdef UNICODE

#define LoadCursorFromFile  LoadCursorFromFileW
#else
#define LoadCursorFromFile  LoadCursorFromFileA
#endif // !UNICODE

#ifdef __cplusplus } #endif /* __cplusplus */


Additional reference words: 3.50
KBCategory: kbgraphic kbdocerr
KBSubcategory: GdiCurico


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 29, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.