This example shows the cursor if it is successfully created.

#define INCL_WINCURSORS
#include <OS2.H>

HWND  hwnd; /* handle of window that has pointer captured */
RECTL rcl;

WinQueryWindowRect(hwnd, &rcl);

       if (WinCreateCursor(hwnd,      /* This must be the handle */
                                      /* of a window for which   */
                                      /* the application can     */
                                      /* receive input.          */
                           100,       /* x,y position of cursor. */
                           100,
                           5,         /* cursor width.           */
                           5,         /* cursor height.          */
                           CURSOR_FLASH,
                           &rcl)) /* region where the cursor */
                                      /* is visible.             */
       WinShowCursor(hwnd,
                     TRUE);           /* make cursor visible. */


[Back] [Next]