Personal Communications Response

Personal Communicationsreceives 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 Communicationsreturns the mouse input information in the following format:
typedef struct tagMOUSE_CF_TEXT
{
 unsigned      unused:12,       // **** Unused ****
 unsigned      fRespons:1,      // TRUE = DDE_REQUEST response
 unsigned      fRelease:1,      // TRUE = Client frees this data
 unsigned      reserved:1,      // **** Reserved ****
 unsigned      fAckReq:1;       // TRUE = Client returns DDE_ACK
 int           cfFormat;        // CF_TEXT
 unsigned char PSPos[4];        // PS position
 unsigned char Tab1[1];         // TAB character
 unsigned char PSRowPos[4];     // PS row position
 unsigned char Tab2[1];         // TAB character
 unsigned char PSColPos[4];     // PS columns position
 unsigned char Tab3[1];         // TAB character
 unsigned char PSSize[4];       // Size of the PS
 unsigned char Tab4[1];         // TAB character
 unsigned char PSRows[4];       // PS number of rows
 unsigned char Tab5[1];         // TAB character
 unsigned char PSCols[4];       // PS number of columns
 unsigned char Tab6[1];         // TAB character
 unsigned char ButtonType[1];   // Pressed button type
 unsigned char Tab7[1];         // TAB character
 unsigned char ClickType[1];    // Click type
 unsigned char Tab8[1];         // TAB character
 unsigned char ClickString[1];  // Retrieved string
} MOUSE_CF_TEXT, FAR *lpMOUSE_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’
hData
If the format is CF_DSPTEXT, Personal Communicationsreturns the mouse input information in the following format:
typedef struct tagMOUSE_CF_DSPTEXT
{
 unsigned      unused:12,         // **** Unused ****
 unsigned      fRespons:1,        // TRUE = DDE_REQUEST response
 unsigned      fRelease:1,        // TRUE = client frees the storage
 unsigned      reserved:1,        // **** Reserved ****
 unsigned      fAckReq:1;         // TRUE = client returns DDE_ACK
 int           cfFormat;          // CF_DSPTEXT
 unsigned      uPSPos;            // PS position
 unsigned      uPSRowPos;         // PS row position
 unsigned      uPSColPos;         // PS column position
 unsigned      uPSSize;           // Size of the presentation space
 unsigned      uPSRows;           // PS number of rows
 unsigned      uPSCols;           // PS number of columns
 unsigned      uButtonType;       // Pressed button type
 unsigned      uClickType;        // Click type
 unsigned char szClickString[1];  // Retrieved string
} MOUSE_CF_DSPTEXT, FAR *lpMOUSE_CF_DSPTEXT;
The following table shows the values in the parameters:
Parameter Name Meaning Value
uPSPos PS offset of the position where mouse was clicked 0 … (uPSSize – 1)
uPSRowPos Row number of the position where mouse was clicked 0 … (uPSRows – 1)
uPSColPos Column number of the position where 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.