Personal Communications Response

Personal Communications receives the Start Mouse Input Intercept and returns an ACK message if it can start this function. Otherwise a negative ACK message is returned to the client with one of the following return codes in the low-order byte of the wStatus field:
WM_DDE_ACK(wStatus, aMOUSE)
Return Code Explanation
1 Mouse Input Intercept has been already started.
6 The specified format is not valid.
9 A system error occurred.
Once the Mouse Input Intercept starts, the client receives DATA messages of the structured field:
WM_DDE_DATA(hData, aMOUSE)
where:
hData
If the format is CF_TEXT, Personal Communications returns the mouse input information in the following format:
typedef struct tagMOUSE_CF_TEXT
{
  unsigned char data[(sizeof(DDEDATA)-1)];
  unsigned char PSPos[4];       /* PS Offset - Mouse position
  unsigned char Tab1[1];        /* Tab character
  unsigned char PSRowPos[4];    /* ROW number of Mouse position
  unsigned char Tab2[1];        /* Tab character
  unsigned char PSColPos[4];    /* Col number of Mouse position
  unsigned char Tab3[1];        /* Tab character
  unsigned char PSSize[4];      /* Size of Presentation Space
  unsigned char Tab4[1];        /* Tab character
  unsigned char PSRows[4[;      /* Row number of PS
  unsigned char Tab5[1];        /* Tab character
  unsigned char PSCols[4];      /* Column number of PS
  unsigned char Tab6[1];        /* Tab character
  unsigned char Button[1];      /* Type of clicked mouse butt n
  unsigned char Tab7[1];        /* Tab character
  unsigned char Click[1];       /* Type of clicking
  unsigned char Tab8[1];        /* Tab character
  unsigned char zClickString[1];/* Retrieved string
} MOUSE_CF_TEXT;
 
typedef union tagDDE_MOUSE_CF_TEXT
{
  DDEDATA        DDEdata;
  MOUSE_CF_TEXT  DDEmouse;
} DDE_MOUSE_CF_TEXT, *lpDDE_MOUSE_CF_TEXT;
The following table shows the values in the parameters:
Parameter Name Meaning Value
PSPos PS offset of the position where mouse was clicked 0 … (PSSize – 1)
PSRowPos Row number of the position where mouse was clicked 0 … (PSRows – 1)
PSColPos Column number of the position where mouse was clicked 0 … (PSCols – 1)
PSSize Presentation space size
PSRows Number of presentation space rows
PSCols Number of presentation space columns
ButtonType Type of clicked mouse button
L
Left button
M
Middle button
R
Right button
ClickType Type of clicking
S
Single click
D
Double click
ClickString Retrieved string to which the mouse pointed A character string terminated with a ‘\0’
Tab1–8 A tab character for delimiter ‘\t’
If the format is CF_DSPTEXT, Personal Communications returns the mouse input information in the following format:
typedef struct tagMOUSE_CF_DSPTEXT
{
  unsigned char  data[(sizeof(DDEDATA)-1)];
  unsigned short uPSPos;                  /* PS Offset  - Mouse position
  unsigned short uPSRowPos;               /* ROW number - Mouse position
  unsigned short uPSColPos;               /* Col number - Mouse position
  unsigned short uPSSize;                 /* Size of Presentation Space
  unsigned short uPSRows;                 /* Row number of PS
  unsigned short uPSCols;                 /* Column number of PS
  unsigned short uButtonType;             /* Type of clicked mouse button
  unsigned short uClickType;              /* Type of clicking
  unsigned char  zClickString[1];          /* Retrieved string
} MOUSE_CF_DSPTEXT;
 
typedef union tagDDE_MOUSE_CF_DSPTEXT
{
  DDEDATA           DDEdata;
  MOUSE_CF_DSPTEXT  DDEmouse;
} DDE_MOUSE_CF_DSPTEXT, *lpDDE_MOUSE_CF_DSPTEXT;
The following table shows the values in the parameters:
Parameter Name Meaning Value
uPSPos PS offset of the position where the mouse was clicked 0 … (uPSSize – 1)
uPSRowPos Row number of the position where the mouse was clicked 0 … (uPSRows – 1)
uPSColPos Column number of the position where the mouse was clicked 0 … (uPSCols – 1)
uPSSize Size of the presentation space
uPSRows Number of rows of the presentation space
uPSCols Number of columns of the presentation space
uButtonType Type of the clicked mouse button
0x0001
Left button
0x0002
Middle button
0x0003
Right button
uClickType Type of clicking
0x0001
Single click
0x0002
Double click
szClickString Retrieved string to which the mouse pointed A character string terminated with a ‘\0’

The DATA messages continue until a Stop Mouse Input Intercept message is sent to Personal Communications.