Difference between revisions of "MouSetPtrPos"
(Created page with "==Description== Directs the mouse driver to set a new row and column coordinate position for the mouse pointer. ==Syntax== <PRE> #define INCL_MOU #include <os2.h> PPTRLOC ...")
Revision as of 06:02, 9 January 2017
Directs the mouse driver to set a new row and column coordinate position for the mouse pointer.
#define INCL_MOU #include <os2.h> PPTRLOC PtrPos; /* Pointer position. */ HMOU DeviceHandle; /* Reserved. Must be 0. */ APIRET rc; /* Return code. */ rc = MouSetPtrPos(PtrPos, DeviceHandle);
- PtrPos (PPTRLOC) - input
- Pointer position.
Address of the mouse pointer position structure.
- DeviceHandle (HMOU) - input
- Reserved. Must be 0.
rc (APIRET) - returns
MouSetPtrPos returns one of the following values:
- 0 NO_ERROR
- 387 ERROR_MOUSE_INV_PARMS
- 466 ERROR_MOU_DETACHED
- 501 ERROR_MOUSE_NO_CONSOLE
The application must ensure that the specified coordinate position conforms to the current display mode orientation for the session. Pel values must be used for graphics modes, and character values must be used for text modes.
This function has no effect on the definition of the display's current collision area specified in MouDrawPtr. If the mouse pointer image is directed into a defined collision area, the pointer image is not drawn until either the pointer is moved outside the collision area, or the collision area is released by MouDrawPtr.
At session initialization, the pointer is set to the center of the screen but is not drawn, because the collision area is set to the entire screen.