Set Cursor Position

3270 5250 VT
Yes Yes Yes
The Set Cursor Position function allows the client application to set the cursor position in the session window.
PostMessage( hServerWnd,
             WM_DDE_POKE,
             hClientWnd,
             PackDDELParam(WW_DDE_POKE,
             hData, aSETCURSOR) );
where:
hData
Identifies a handle to a Windows global memory object that contains the cursor positioning information in the following structure:
typedef struct tagSETCURSOR
{
  unsigned char  poke[(sizeof(DDEPOKE)-1)];
  unsigned short uSetCursorType; /* Cursor Set Type
  unsigned short uSetCursor1;    /* Cursor Row or PS Offset
  unsigned short uSetCursor2;    /* Cursor Col
} SETCURSOR;
 
typedef union tagDDE_SETCURSOR
{
  DDEPOKE    DDEpoke;
  SETCURSOR  DDEsetcursor;
} DDE_SETCURSOR, *lpDDE_SETCURSOR;
Personal Communications supports two ways to set the cursor position:
  • PS Offset ( uSetCursorType = 0 )
  • Row/Column number ( uSetCursorType = 1 )
The application specifies which method by setting the uSetCursorType field to the appropriate value, followed by setting the two other fields uSetCursor1 and uSetCursor2 to their appropriate values as follows:
  • uSetCursorType = 0 offset
    • uSetCursor1: 0 … (PSsize – 1)
  • uSetCursorType = 1 row/col
    • uSetCursor1: 0 … (PSrows – 1)
    • uSetCursor2: 0 … (PScols – 1)
aSETCURSOR
Identifies cursor position as the item.