Difference between revisions of "MouSetPtrPos"

From EDM2
Jump to: navigation, search
m (Ak120 moved page OS2 API:CPI:MouSetPtrPos to MouSetPtrPos)
m
Line 1: Line 1:
==Description==
 
 
Directs the mouse driver to set a new row and column coordinate position for the mouse pointer.
 
Directs the mouse driver to set a new row and column coordinate position for the mouse pointer.
  
Line 12: Line 11:
  
 
rc = MouSetPtrPos(PtrPos, DeviceHandle);
 
rc = MouSetPtrPos(PtrPos, DeviceHandle);
 +
</PRE>
  
</PRE>
 
 
==Parameters==
 
==Parameters==
; PtrPos (PPTRLOC) - input : Pointer position.
+
;PtrPos (PPTRLOC) - input : Pointer position.
Address of the mouse pointer position structure.  
+
:Address of the mouse pointer position structure.
 
+
 
; DeviceHandle (HMOU) - input : Reserved. Must be 0.
 
; DeviceHandle (HMOU) - input : Reserved. Must be 0.
  
 
==Return Code==
 
==Return Code==
 
  rc (APIRET) - returns
 
  rc (APIRET) - returns
 
 
MouSetPtrPos returns one of the following values:
 
MouSetPtrPos returns one of the following values:
 
+
* 0    NO_ERROR
* 0    NO_ERROR  
+
* 387 ERROR_MOUSE_INV_PARMS  
* 387       ERROR_MOUSE_INV_PARMS  
+
* 466 ERROR_MOU_DETACHED  
* 466       ERROR_MOU_DETACHED  
+
* 501 ERROR_MOUSE_NO_CONSOLE
* 501       ERROR_MOUSE_NO_CONSOLE
+
  
 
==Remarks==
 
==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.
 
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.
+
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.  
 
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.  
  
==Example Code==
+
[[Category:Mou]]
<PRE>
+
 
+
</PRE>
+
==Related Functions==
+
*
+
 
+
 
+
[[Category:The OS/2 API Project]]
+

Revision as of 06:04, 9 January 2017

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.