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,
             MAKELONG(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 unused:13;           // ** unused **
 unsigned fRelease:1;          // TRUE = Session frees memory
 unsigned freserved:2;         // ** reserved **
 int      cfFormat;            // Always CF_DSPTEXT
 unsigned uSetCursorType;      // Cursor Set Type
 unsigned uSetCursor1;         // Cursor Row or PS Offset
 unsigned uSetCursor2;         // Cursor Col
} SETCURSOR, FAR *lpSETCURSOR;
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.