MouSetPtrPos

From EDM2
Revision as of 06:04, 9 January 2017 by Ak120 (Talk | contribs)

Jump to: navigation, search

Directs the mouse driver to set a new row and column coordinate position for the mouse pointer.

Syntax

#define INCL_MOU
#include <os2.h>

PPTRLOC    PtrPos;        /*  Pointer position. */
HMOU       DeviceHandle;  /*  Reserved.  Must be 0. */
APIRET     rc;            /*  Return code. */

rc = MouSetPtrPos(PtrPos, DeviceHandle);

Parameters

PtrPos (PPTRLOC) - input 
Pointer position.
Address of the mouse pointer position structure.
DeviceHandle (HMOU) - input 
Reserved. Must be 0.

Return Code

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

Remarks

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.