INFO: Prototypes for SetSystemCursor() & LoadCursorFromFile()

ID: Q122564

3.50 WINDOWS NT kbgraphic kbdocerr
The information in this article applies to:


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 query words:


Keywords          : kbNTOS351 kbSDKWin32 
Version           : winnt:3.5
Platform          : winnt 
Issue type        : kbinfo 

Last Reviewed: June 15, 1999