In this example the pointer is kept hidden until mouse activity is detected. The WinWaitMsg call is used to wait for any mouse message.
#define INCL_WINWINDOWMGR #define INCL_WINPOINTERS #define INCL_WINDESKTOP #define INCL_WININPUT #include <OS2.H> HWND hwnd; HPOINTER hpointer; HAB hab; /* Get the pointer handle */ hpointer = WinQueryPointer(HWND_DESKTOP); /* Hide the mouse */ WinShowPointer(hwnd,FALSE); /* All the mouse messages from WM_MOUSEFIRST */ /* to WM_BUTTON3DBLCLK inclusive */ WinWaitMsg(hab, WM_MOUSEFIRST, WM_BUTTON3DBLCLK); /* If there has been any mouse activity, show the mouse */ WinShowPointer(hwnd,TRUE);