This is part of Family API which allow to create dual-os version of program runs under OS/2 and DOS

Note: This is legacy API call. It is recommended to use 32-bit equivalent

MouSetPtrPos

This call directs the mouse driver to set a new row and column coordinate position for the mouse pointer.

Syntax

MouSetPtrPos (PtrPos, DeviceHandle)

Parameters

PtrPos (PPTRLOC) - input : Address of the mouse pointer position structure:

pointerrow (USHORT) : New pointer row coordinate (pels or characters).

pointercol (USHORT) : New pointer column coordinate (pels or characters).

DeviceHandle (HMOU) - input : Handle of the mouse device from a previous MouOpen.

Return Code

rc (USHORT) - return

Return code descriptions are:

0 NO_ERROR

385 ERROR_MOUSE_NO_DEVICE

387 ERROR_MOUSE_INV_PARMS

466 ERROR_MOU_DETACHED

501 ERROR_MOUSE_NO_CONSOLE

505 ERROR_MOU_EXTENDED_SG

Remarks

The application must ensure that the coordinate position specified conforms to the current display mode orientation for the session. Pel values must be used for graphics modes and character values for text modes.

This function has no effect on the display's current collision area definition as specified by the MouDrawPtr call. 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 the MouDrawPtr call.

Bindings

C

typedef struct _PTRLOC { /* moupl */ USHORT row; /* pointer row coordinate screen position */ USHORT col; /* pointer column coordinate screen position */ } PTRLOC; #define INCL_MOU USHORT rc = MouSetPtrPos(PtrPos, DeviceHandle); PPTRLOC PtrPos; /* Double word structure */ HMOU DeviceHandle; /* Mouse device handle */ USHORT rc; /* return code */

MASM

PTRLOC struc moupl_row dw ? ;pointer row coordinate screen position moupl_col dw ? ;pointer column coordinate screen position PTRLOC ends EXTRN MouSetPtrPos:FAR INCL_MOU EQU 1 PUSH@ OTHER PtrPos ;Double word structure PUSH WORD DeviceHandle ;Mouse device handle CALL MouSetPtrPos Returns WORD
Family API
DOS	Process Manager	DosBeep DosExit DosSleep DosExecPgm
File Manager	DosChDir DosChgFilePtr DosClose DosDelete DosDupHandle DosMkDir DosMove DosQCurDir DosQCurDisk DosSetFileMode DosOpen DosQFileInfo DosRead DosQFileMode DosQFSInfo DosQVerify DosRmDir DosSelectDisk DosFindClose DosFindFirst DosFindNext DosSetFileInfo DosSetVerify DosWrite DosFileLocks DosSetFHandState DosNewSize DosBufReset DosQFHandState DosSetFSinfo DosShutdown
Memory Manager	DosFreeSeg DosSubAlloc DosSubFree DosSubSet DosAllocHuge DosAllocSeg DosReallocHuge DosReallocSeg DosGetHugeShift DosCreateCSAlias
NLS	DosCaseMap DosGetCtryInfo DosGetDBCSEv DosSetCtryCode DosGetCollate DosGetMessage DosInsMessage DosPutMessage
Date and Time	DosSetDateTime DosGetDateTime
Devices	DosDevConfig DosDevIOCtl DosDevIOCtl2
Signals	DosHoldSignal DosSetSigHandler
Misc	BadDynLink DosGetEnv DosGetMachineMode DosGetVersion DosError DosErrClass DosSetVec
KBD	KbdCharIn KbdFlushBuffer KbdGetStatus KbdSetStatus KbdStringIn KbdPeek
VIO	VioGetBuf VioGetConfig VioGetCurPos VioGetCurType VioGetPhysBuf VioReadCellStr VioReadCharStr VioScrollUp VioScrollDn VioScrollLf VioScrollRt VioScrUnLock VioSetCurPos VioSetCurType VioSetMode VioGetMode VioShowBuf VioWrtCellStr VioWrtCharStr VioWrtCharStrAtt VioWrtNAttr VioWrtNCell VioWrtNChar VioWrtTTY VioScrLock VioPopUp
Tools	BIND
Modules	DOSCALLS.DLL VIOCALLS.DLL KBDCALLS.DLL MSG.DLL
Libraries	API.LIB OS2386.LIB FAPI.LIB DOSCALLS.LIB SUBCALLS.LIB