home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pc3270sa.zip / dde_c.h next >
Text File  |  2002-02-28  |  30KB  |  678 lines

  1. /*****************************************************************************/
  2. /*                                                                           */
  3. /*  Module Name     : DDE_C.H                                                */
  4. /*                                                                           */
  5. /*  Description     : DDE  Structure, Return Codes and Routines              */
  6. /*                                                                           */
  7. /*  Copyright Notice: IBM Personal Communication/3270 Version 4.1            */
  8. /*                    for Windows 95.                                        */
  9. /*                    (C) COPYRIGHT IBM CORP. 1984,1996 - PROGRAM PROPERTY   */
  10. /*                    OF IBM ALL RIGHTS RESERVED                             */
  11. /*                                                                           */
  12. /*---------------------------------------------------------------------------*/
  13. /*  Function:                                                                */
  14. /*                                                                           */
  15. /*    Define the DDE  structure, return code constants.                      */
  16. /*                                                                           */
  17. /*****************************************************************************/
  18.  
  19. #ifdef __cplusplus                     /* C++                                */
  20.   extern "C" {
  21. #endif
  22.  
  23. /*---------------------------------------------------------------------------*/
  24. /*  Return Codes                                                             */
  25. /*---------------------------------------------------------------------------*/
  26.  
  27. #define PCS_DDE_ACK                      0x0001
  28. #define PCS_DDE_NACK_ADVISED             0x0100
  29. #define PCS_DDE_NACK_INVALID_POSITION    0x0100
  30. #define PCS_DDE_NACK_INVALID_OPTION      0x0100
  31. #define PCS_DDE_NACK_DATA_NOT_READY      0x0100
  32. #define PCS_DDE_NACK_INVALID_LENGTH      0x0200
  33. #define PCS_DDE_NACK_INVALID_PSPOSITION  0x0200
  34. #define PCS_DDE_NACK_UNFORMATTED         0x0200
  35. #define PCS_DDE_NACK_NOT_FOUND           0x0200
  36. #define PCS_DDE_NACK_ADCON_ACTIVE        0x0200
  37. #define PCS_DDE_NACK_INVALID_PARAM       0x0200
  38. #define PCS_DDE_NACK_INVALID_ADVPOS      0x0300
  39. #define PCS_DDE_NACK_INVALID_FLAG        0x0300
  40. #define PCS_DDE_NACK_INVALID_ROW         0x0300
  41. #define PCS_DDE_NACK_DOID_INUSE          0x0300
  42. #define PCS_DDE_NACK_UNCONDITION         0x0300
  43. #define PCS_DDE_NACK_INVALID_STRLEN      0x0400
  44. #define PCS_DDE_NACK_INVALID_COL         0x0400
  45. #define PCS_DDE_NACK_INVALID_SRCHDIR     0x0400
  46. #define PCS_DDE_NACK_ALREADY_SET         0x0400
  47. #define PCS_DDE_NACK_INPUT_INHIBITTED    0x0500
  48. #define PCS_DDE_NACK_SYNTAX_ERROR        0x0600
  49. #define PCS_DDE_NACK_INVALID_FORMAT      0x0600
  50. #define PCS_DDE_NACK_DATA_TRUNCATED      0x0700
  51. #define PCS_DDE_NACK_SYSTEM_ERROR        0x0900
  52. #define PCS_DDE_NACK_BUFFER_EXCEEDED     0x1000
  53. #define PCS_DDE_NACK_XLATE_ERROR         0x1100
  54.  
  55. /*---------------------------------------------------------------------------*/
  56. /*  Code Conversion                                                          */
  57. /*---------------------------------------------------------------------------*/
  58.  
  59. typedef struct tagWCDDE_CONV
  60. {
  61.     BYTE  ddepoke[(sizeof(DDEPOKE)-1)];
  62.     char  szSourceName[256];
  63.     char  szTargetName[256];
  64.     BYTE  ConvType;
  65.     WORD  uSourceLength;
  66.     WORD  uTargetLength;
  67. } WCDDE_CONV;
  68.  
  69. typedef union tagDDE_CONV
  70. {
  71.     DDEPOKE DDEpoke;
  72.     WCDDE_CONV  DDEConv;
  73. } DDE_CONV;
  74.  
  75. typedef DDE_CONV FAR *LPDDE_CONV;
  76.  
  77. /*---------------------------------------------------------------------------*/
  78. /*  Find Field                                                               */
  79. /*---------------------------------------------------------------------------*/
  80.  
  81. typedef struct tagFINDFIELD
  82. {
  83.   unsigned char  data[(sizeof(DDEDATA)-1)];
  84.   unsigned short uFieldStart;    /* Field start offset                       */
  85.   unsigned short uFieldLength;   /* Field Length                             */
  86.   unsigned char  cAttribute;     /* Attribute character                      */
  87.   unsigned char  ubReserved;     /* *** Reserved ***                         */
  88. } FINDFIELD;
  89.  
  90. typedef union tagDDE_FINDFIELD
  91. {
  92.   DDEDATA     DDEdata;
  93.   FINDFIELD   DDEfield;
  94. } DDE_FINDFIELD, *lpDDE_FINDFIELD;
  95.  
  96. typedef struct tagFINDFIELD_CF_TEXT                 
  97. {                                                   
  98.   unsigned char     data[(sizeof(DDEDATA)-1)];              
  99.   unsigned char     Fielddata[80];                          
  100. } FINDFIELD_CF_TEXT;                                
  101.                                                     
  102. typedef FINDFIELD_CF_TEXT FAR *LPFINDFIELD_CF_TEXT; 
  103.  
  104. typedef union tagDDE_FIELD
  105. {
  106.   DDEDATA     DDEdata;
  107.   FINDFIELD   DDEFindField;
  108.   FINDFIELD_CF_TEXT DDEFindField_cftxt;             
  109. } DDE_FIELD;
  110.  
  111. typedef DDE_FIELD FAR *LPDDE_FIELD;
  112.  
  113. typedef struct tagPSFIELDS16
  114. {
  115.   BYTE      ubAttribute;                                                //@wd01a
  116.   WORD      uFieldStart;                                                //@wd01a
  117.   WORD      uFieldLength;                                               //@wd01a
  118. } PSFIELDS16;                                                           //@wd01a
  119.  
  120. typedef PSFIELDS16 FAR *LPPSFIELDS16;
  121.  
  122. typedef struct tagFINDFIELD16
  123. {
  124.   unsigned char       data[(sizeof(DDEDATA)-1)];
  125.   PSFIELDS16  field;
  126. } FINDFIELD16;
  127.  
  128. typedef FINDFIELD16 FAR *LPFINDFIELD16;
  129.  
  130.  
  131. typedef union tagDDE_FIELD16
  132. {
  133.   DDEDATA     DDEdata;
  134.   FINDFIELD16 DDEFindField;
  135.   FINDFIELD_CF_TEXT DDEFindField_cftxt;                         //@D4A
  136. } DDE_FIELD16;
  137.  
  138. typedef DDE_FIELD16 FAR *LPDDE_FIELD16;
  139.  
  140. /*---------------------------------------------------------------------------*/
  141. /*  Get Keystrokes                                                           */
  142. /*---------------------------------------------------------------------------*/
  143.  
  144. typedef struct tagKEYSTROKE
  145. {
  146.   unsigned char  data[(sizeof(DDEDATA)-1)];
  147.   unsigned short uTextType;      /* Type of keystrokes                       */
  148.   unsigned char  szKeyData[1];   /* Keystrokes                               */
  149. } KEYSTROKE;
  150.  
  151. typedef union tagDDE_GETKEYSTROKE
  152. {
  153.   DDEDATA     DDEdata;
  154.   KEYSTROKE   DDEkey;
  155. } DDE_GETKEYSTROKE, *lpDDE_GETKEYSTROKE;
  156.  
  157. #define PCS_PURETEXT   0         /* Pure text, no HLLAPI commands            */
  158. #define PCS_HLLAPITEXT 1         /* Text, including HLLAPI tokens            */
  159.  
  160. /*---------------------------------------------------------------------------*/
  161. /*  Get Mouse Input                                                          */
  162. /*---------------------------------------------------------------------------*/
  163.  
  164. typedef struct tagMOUSE_CF_DSPTEXT
  165. {
  166.   unsigned char  data[(sizeof(DDEDATA)-1)];
  167.   unsigned short uPSPos;         /* PS Offset of the Mouse position          */
  168.   unsigned short uPSRowPos;      /* ROW number of Mouse position             */
  169.   unsigned short uPSColPos;      /* Column number of Mouse position          */
  170.   unsigned short uPSSize;        /* Size od Presentation Space               */
  171.   unsigned short uPSRows;        /* Row number of PS                         */
  172.   unsigned short uPSCols;        /* Column number of PS                      */
  173.   unsigned short uButtonType;    /* Type of clicked mouse button             */
  174.   unsigned short uClickType;     /* Type of clicking                         */
  175.   unsigned char  zClickString[1];/* Retrived string                          */
  176. } MOUSE_CF_DSPTEXT;
  177.  
  178. typedef union tagDDE_MOUSE_CF_DSPTEXT
  179. {
  180.   DDEDATA           DDEdata;
  181.   MOUSE_CF_DSPTEXT  DDEmouse;
  182. } DDE_MOUSE_CF_DSPTEXT, *lpDDE_MOUSE_CF_DSPTEXT;
  183.  
  184. #define PCS_MOUSE_LEFT   0x0001  /* Left button                              */
  185. #define PCS_MOUSE_RIGHT  0x0002  /* Right button                             */
  186. #define PCS_MOUSE_MIDDLE 0x0003  /* Middle button                            */
  187. #define PCS_MOUSE_SINGLE 0x0001  /* Single Click                             */
  188. #define PCS_MOUSE_DOUBLE 0x0002  /* Double click                             */
  189.  
  190. typedef struct tagMOUSE_CF_TEXT
  191. {
  192.   unsigned char data[(sizeof(DDEDATA)-1)];
  193.   unsigned char PSPos[4];        /* PS Offset of the Mouse position          */
  194.   unsigned char Tab1[1];         /* Tab character                            */
  195.   unsigned char PSRowPos[4];     /* ROW number of Mouse position             */
  196.   unsigned char Tab2[1];         /* Tab character                            */
  197.   unsigned char PSColPos[4];     /* Column number of Mouse position          */
  198.   unsigned char Tab3[1];         /* Tab character                            */
  199.   unsigned char PSSize[4];       /* Size od Presentation Space               */
  200.   unsigned char Tab4[1];         /* Tab character                            */
  201.   unsigned char PSRows[4];       /* Row number of PS                         */
  202.   unsigned char Tab5[1];         /* Tab character                            */
  203.   unsigned char PSCols[4];       /* Column number of PS                      */
  204.   unsigned char Tab6[1];         /* Tab character                            */
  205.   unsigned char Button[1];       /* Type of clicked mouse button             */
  206.   unsigned char Tab7[1];         /* Tab character                            */
  207.   unsigned char Click[1];        /* Type of clicking                         */
  208.   unsigned char Tab8[1];         /* Tab character                            */
  209.   unsigned char zClickString[1]; /* Retrived string                          */
  210. } MOUSE_CF_TEXT;
  211.  
  212. typedef union tagDDE_MOUSE_CF_TEXT
  213. {
  214.   DDEDATA        DDEdata;
  215.   MOUSE_CF_TEXT  DDEmouse;
  216. } DDE_MOUSE_CF_TEXT, *lpDDE_MOUSE_CF_TEXT;
  217.  
  218. #define PCS_MOUSE_TEXT_LEFT   'L' /* Left button                             */
  219. #define PCS_MOUSE_TEXT_RIGHT  'R' /* Right button                            */
  220. #define PCS_MOUSE_TEXT_MIDDLE 'M' /* Middle button                           */
  221. #define PCS_MOUSE_TEXT_SINGLE 'S' /* Single Click                            */
  222. #define PCS_MOUSE_TEXT_DOUBLE 'D' /* Double click                            */
  223.  
  224. /*---------------------------------------------------------------------------*/
  225. /*  Get Number of Close Request                                              */
  226. /*---------------------------------------------------------------------------*/
  227.  
  228. typedef struct tagCLOSEREQ
  229. {
  230.   unsigned char  data[(sizeof(DDEDATA)-1)];
  231.   unsigned short uCloseReqCount; /* Number of the close requests.            */
  232. } CLOSEREQ;
  233.  
  234. typedef union tagDDE_CLOSEREQ
  235. {
  236.   DDEDATA   DDEdata;
  237.   CLOSEREQ  DDEclose;
  238. } DDE_CLOSEREQ, *lpDDE_CLOSEREQ;
  239.  
  240. /*---------------------------------------------------------------------------*/
  241. /*  Get Operator Indicator Area                                              */
  242. /*---------------------------------------------------------------------------*/
  243.  
  244. typedef struct tagOIADATA
  245. {
  246.   unsigned char  data[(sizeof(DDEDATA)-1)];
  247.   unsigned char  OIA[80];        /*                                          */
  248. } OIADATA;
  249.  
  250. typedef union tagDDE_OIADATA
  251. {
  252.   DDEDATA   DDEdata;
  253.   OIADATA   DDEoia;
  254. } DDE_OIADATA, *lpDDE_OIADATA;
  255.  
  256. /*---------------------------------------------------------------------------*/
  257. /*  Get Partial Presentation Space                                           */
  258. /*---------------------------------------------------------------------------*/
  259.  
  260. typedef struct tagEPS_CF_DSPTEXT
  261. {
  262.   unsigned char  data[(sizeof(DDEDATA)-1)];
  263.   unsigned short uPSPosition;    /* Position of the part of PS               */
  264.   unsigned short uPSLength;      /* Length of the part of the PS             */
  265.   unsigned short uPSRows;        /* PS number of rows                        */
  266.   unsigned short uPSCols;        /* PS number of columns                     */
  267.   unsigned short uPSOffset;      /* Offset to the presentation space         */
  268.   unsigned short uFieldCount;    /* Number of fields                         */
  269.   unsigned short uFieldOffset;   /* Offset to the field array                */
  270.   unsigned char  PSData[1];      /* PS and Field list Array(lpPSFIELDS)      */
  271. } EPS_CF_DSPTEXT;
  272.  
  273. typedef union tagDDE_EPS_CF_DSPTEXT
  274. {
  275.   DDEDATA         DDEdata;
  276.   EPS_CF_DSPTEXT  DDEeps;
  277. } DDE_EPS_CF_DSPTEXT, *lpDDE_EPS_CF_DSPTEXT;
  278.  
  279. typedef struct tagEPS_CF_TEXT
  280. {
  281.   unsigned char  data[(sizeof(DDEDATA)-1)];
  282.   unsigned char  PSPOSITION[4];  /* Postion of part of the PS                */
  283.   unsigned char  Tab1[1];        /* Tab character                            */
  284.   unsigned char  PSLENGTH[4];    /* Length of the part of the PS             */
  285.   unsigned char  Tab2[1];        /* Tab character                            */
  286.   unsigned char  PSROWS[4];      /* Number of rows in the PS                 */
  287.   unsigned char  Tab3[1];        /* Tab character                            */
  288.   unsigned char  PSCOLS[4];      /* Number of Cols in the PS                 */
  289.   unsigned char  Tab4[1];        /* Tab character                            */
  290.   unsigned char  PS[1];          /* PS                                       */
  291. } EPS_CF_TEXT;
  292.  
  293. typedef union tagDDE_EPS_CF_TEXT
  294. {
  295.   DDEDATA      DDEdata;
  296.   EPS_CF_TEXT  DDEeps;
  297. } DDE_EPS_CF_TEXT, *lpDDE_EPS_CF_TEXT;
  298.  
  299. typedef struct tagPS_FIELD
  300. {
  301.   unsigned char  FieldStart[4];
  302.   unsigned char  TabF1[1];
  303.   unsigned char  FieldLength[4];
  304.   unsigned char  TabF2[1];
  305.   unsigned char  Attribute;
  306.   unsigned char  TabF3[1];
  307. } PS_FIELD, *lpPS_FIELD;
  308.  
  309. typedef struct tagFL_CF_TEXT
  310. {
  311.   unsigned char  Tab5[1];        /* Tab character                            */
  312.   unsigned char  PSFldCount[4];  /* Number of fields in the PS               */
  313.   unsigned char  Tab6[1];        /* Tab character                            */
  314.   PS_FIELD       Field[1];       /* Field List Array                         */
  315. } FL_CF_TEXT, *lpFL_CF_TEXT;
  316.  
  317. typedef struct tagPSFIELDS
  318. {
  319.   unsigned short uFieldStart;    /* Field start offset                       */
  320.   unsigned short uFieldLength;   /* Field Length                             */
  321.   unsigned char  cAttribute;     /* Attribute character                      */
  322.   unsigned char  ubReserved;     /* *** Reserved ***                         */
  323. } PSFIELDS, *lpPSFIELDS;
  324.  
  325. /*---------------------------------------------------------------------------*/
  326. /*  Get Presentation Space                                                   */
  327. /*---------------------------------------------------------------------------*/
  328.  
  329. typedef struct tagPS_CF_DSPTEXT
  330. {
  331.   unsigned char  data[(sizeof(DDEDATA)-1)];
  332.   unsigned short uPSSize;        /* Size of the presentation space           */
  333.   unsigned short uPSRows;        /* PS number of rows                        */
  334.   unsigned short uPSCols;        /* PS number of columns                     */
  335.   unsigned short uPSOffset;      /* Offset to the presentation space         */
  336.   unsigned short uFieldCount;    /* Number of fields                         */
  337.   unsigned short uFieldOffset;   /* Offset to the field array                */
  338.   unsigned char  PSData[1];      /* PS and Field list Array(lpPSFIELDS)      */
  339. } PS_CF_DSPTEXT;
  340.  
  341. typedef union tagDDE_PS_CF_DSPTEXT
  342. {
  343.   DDEDATA        DDEdata;
  344.   PS_CF_DSPTEXT  DDEps;
  345. } DDE_PS_CF_DSPTEXT, *lpDDE_PS_CF_DSPTEXT;
  346.  
  347. typedef struct tagPS_CF_TEXT
  348. {
  349.   unsigned char  data[(sizeof(DDEDATA)-1)];
  350.   unsigned char  PSSIZE[4];      /* Size of the PS                           */
  351.   unsigned char  Tab1[1];        /* Tab character                            */
  352.   unsigned char  PSROWS[4];      /* Number of rows in the PS                 */
  353.   unsigned char  Tab2[1];        /* Tab character                            */
  354.   unsigned char  PSCOLS[4];      /* Number of Cols in the PS                 */
  355.   unsigned char  Tab3[1];        /* Tab character                            */
  356.   unsigned char  PS[1];          /* PS                                       */
  357. } PS_CF_TEXT;
  358.  
  359. typedef union tagDDE_PS_CF_TEXT
  360. {
  361.   DDEDATA     DDEdata;
  362.   PS_CF_TEXT  DDEps;
  363. } DDE_PS_CF_TEXT, *lpDDE_PS_CF_TEXT;
  364.  
  365. /*---------------------------------------------------------------------------*/
  366. /*  Put Data to Presentation Space                                           */
  367. /*---------------------------------------------------------------------------*/
  368.  
  369. typedef struct tagPutString
  370. {
  371.   unsigned char  poke[(sizeof(DDEPOKE)-1)];
  372.   unsigned short uPSStart;       /* PS Position                              */
  373.   unsigned short uEOFflag;       /* EOF effective switch                     */
  374.   unsigned char  szStringData[1];/* String Data                              */
  375. } PUTSTRING;
  376.  
  377. typedef union tagDDE_PUTSTRING
  378. {
  379.   DDEPOKE    DDEpoke;
  380.   PUTSTRING  DDEputstring;
  381. } DDE_PUTSTRING, *lpDDE_PUTSTRING;
  382.  
  383. /*---------------------------------------------------------------------------*/
  384. /*  Search for String                                                        */
  385. /*---------------------------------------------------------------------------*/
  386.  
  387. typedef struct tagSEARCH
  388. {
  389.   unsigned char  data[(sizeof(DDEDATA)-1)];
  390.   unsigned short uFieldStart;    /* String start offset                      */
  391. } SEARCH;
  392.  
  393. typedef union tagDDE_SEARCH
  394. {
  395.   DDEDATA  DDEdata;
  396.   SEARCH   DDEsearch;
  397. } DDE_SEARCH, *lpDDE_SEARCH;
  398.  
  399. /*---------------------------------------------------------------------------*/
  400. /*  Send Keystrokes                                                          */
  401. /*---------------------------------------------------------------------------*/
  402.  
  403. typedef struct tagKeystrokes
  404. {
  405.   unsigned char  poke[(sizeof(DDEPOKE)-1)];
  406.   unsigned short uTextType;      /* Type of keystrokes                       */
  407.   unsigned short uRetryCount;    /* Retry count 1 .. 16                      */
  408.   unsigned char  szKeyData[1];   /* Keystrokes                               */
  409. } KEYSTROKES;
  410.  
  411. typedef union tagDDE_SENDKEYSTROKES
  412. {
  413.   DDEPOKE     DDEpoke;
  414.   KEYSTROKES  DDEkeys;
  415. } DDE_SENDKEYSTROKES, *lpDDE_SENDKEYSTROKES;
  416.  
  417. /*---------------------------------------------------------------------------*/
  418. /*  Set Cursor Position                                                      */
  419. /*---------------------------------------------------------------------------*/
  420.  
  421. typedef struct tagSETCURSOR
  422. {
  423.   unsigned char  poke[(sizeof(DDEPOKE)-1)];
  424.   unsigned short uSetCursorType; /* Cursor Set Type                          */
  425.   unsigned short uSetCursor1;    /* Cursor Row or PS Offset                  */
  426.   unsigned short uSetCursor2;    /* Cursor Col                               */
  427. } SETCURSOR;
  428.  
  429. typedef union tagDDE_SETCURSOR
  430. {
  431.   DDEPOKE    DDEpoke;
  432.   SETCURSOR  DDEsetcursor;
  433. } DDE_SETCURSOR, *lpDDE_SETCURSOR;
  434.  
  435. #define PCS_SETCURSOR_PSPOS  0x0000
  436. #define PCS_SETCURSOR_ROWCOL 0x0001
  437.  
  438. /*---------------------------------------------------------------------------*/
  439. /*  Set Mouse Intercept Condition                                            */
  440. /*---------------------------------------------------------------------------*/
  441.  
  442. typedef struct tagSETMOUSE_CF_DSPTEXT
  443. {
  444.   unsigned char poke[(sizeof(DDEPOKE)-1)];
  445.   BOOL          bLeftButton;     /* Enable intercepting left button          */
  446.   BOOL          bRightButton;    /* Enable intercepting right button         */
  447.   BOOL          bMiddleButton;   /* Enable intercepting middle button        */
  448.   BOOL          bSingleClick;    /* Enable intercepting single click         */
  449.   BOOL          bDoubleClick;    /* Enable intercepting double click         */
  450.   BOOL          bRetrieveString; /* Enable intercepting retrieve string      */
  451. } SETMOUSE_CF_DSPTEXT;
  452.  
  453. typedef union tagDDE_SETMOUSE_CF_DSPTEXT
  454. {
  455.   DDEPOKE              DDEpoke;
  456.   SETMOUSE_CF_DSPTEXT  DDEcond;
  457. } DDE_SETMOUSE_CF_DSPTEXT, *lpDDE_SETMOUSE_CF_DSPTEXT;
  458.  
  459. typedef struct tagSETMOUSE_CF_TEXT
  460. {
  461.   unsigned char poke[(sizeof(DDEPOKE)-1)];
  462.   unsigned char zMouseCondition[1];
  463. } SETMOUSE_CF_TEXT;
  464.  
  465. typedef union tagDDE_SETMOUSE_CF_TEXT
  466. {
  467.   DDEPOKE           DDEpoke;
  468.   SETMOUSE_CF_TEXT  DDEcond;
  469. } DDE_SETMOUSE_CF_TEXT, *lpDDE_SETMOUSE_CF_TEXT;
  470.  
  471. #define PCS_SETMOUSE_TEXT_LEFTON    'L' /* Enable intercepting left button   */
  472. #define PCS_SETMOUSE_TEXT_LEFTOFF   'l' /* Disable intercepting left button  */
  473. #define PCS_SETMOUSE_TEXT_RIGHTON   'R' /* Enable intercepting Right button  */
  474. #define PCS_SETMOUSE_TEXT_RIGHTOFF  'r' /* Disable intercepting Right button */
  475. #define PCS_SETMOUSE_TEXT_MIDDLEON  'M' /* Enable intercepting Middle button */
  476. #define PCS_SETMOUSE_TEXT_MIDDLEOFF 'm' /* Disable intercepting Middle button*/
  477. #define PCS_SETMOUSE_TEXT_SINGLEON  'S' /* Enable intercepting Single Click  */
  478. #define PCS_SETMOUSE_TEXT_SINGLEOFF 's' /* Disable intercepting Single Click */
  479. #define PCS_SETMOUSE_TEXT_DOUBLEON  'D' /* Enable intercepting Double click  */
  480. #define PCS_SETMOUSE_TEXT_DOUBLEOFF 'd' /* Disable intercepting Double click */
  481. #define PCS_SETMOUSE_TEXT_RETSTRON  'T' /* Retrieve the pointed string       */
  482. #define PCS_SETMOUSE_TEXT_RETSTROFF 't' /* Not retieve the pointed string    */
  483.  
  484. /*---------------------------------------------------------------------------*/
  485. /*  Set Presentation Space Service Condition                                 */
  486. /*---------------------------------------------------------------------------*/
  487.  
  488. typedef struct tagPSSERVCOND
  489. {
  490.   unsigned char  poke[(sizeof(DDEPOKE)-1)];
  491.   unsigned short uPSStart;       /* PS Position                              */
  492.   unsigned short uPSLength;      /* Length of String or PS                   */
  493.   unsigned short uSearchDir;     /* Direction for search                     */
  494.   unsigned short uEOFflag;       /* EOF effective switch                     */
  495.   unsigned char  szTargetString[1]; /* Target String                         */
  496. } PSSERVCOND;
  497.  
  498. typedef union tagDDE_PSSERVCOND
  499. {
  500.   DDEPOKE     DDEpoke;
  501.   PSSERVCOND  DDEcond;
  502. } DDE_PSSERVCOND, *lpDDE_PSSERVCOND;
  503.  
  504. #define PCS_SRCHFRWD    0        /* Search forward.                          */
  505. #define PCS_SRCHBKWD    1        /* Search backward.                         */
  506. #define PCS_UNEFFECTEOF 0        /* The string is not truncated at EOF.      */
  507. #define PCS_EFFECTEOF   1        /* The string is truncated at EOF.          */
  508.  
  509. /*---------------------------------------------------------------------------*/
  510. /*  Set Session Advise Condition                                             */
  511. /*---------------------------------------------------------------------------*/
  512.  
  513. typedef struct tagSEARCHDATA
  514. {
  515.   unsigned char  poke[(sizeof(DDEPOKE)-1)];
  516.   unsigned short uPSStart;       /* PS Position of string                    */
  517.   unsigned short uPSLength;      /* Length of String                         */
  518.   BOOL           bCaseSensitive; /* Case Sensitive TRUE=YES                  */
  519.   unsigned char  SearchString[1];/* Search String                            */
  520. } SEARCHDATA;
  521.  
  522. typedef union tagDDE_SEARCHDATA
  523. {
  524.   DDEPOKE     DDEpoke;
  525.   SEARCHDATA  DDEcond;
  526. } DDE_SEARCHDATA, *lpDDE_SEARCHDATA;
  527.  
  528. /*---------------------------------------------------------------------------*/
  529. /*  Set Structured Field Service Condition                                   */
  530. /*---------------------------------------------------------------------------*/
  531.  
  532. typedef struct tagSFSERVCOND
  533. {
  534.   unsigned char  poke[(sizeof(DDEPOKE)-1)];
  535.   unsigned short uBufferLength;  /* Buffer size of Read_SF                   */
  536.   unsigned short uQRLength;      /* Length of Query Reply data               */
  537.   unsigned char  szQueryReply[1];/* Query Reply data                         */
  538. } SFSERVCOND;
  539.  
  540. typedef union tagDDE_SFSERVCOND
  541. {
  542.   DDEPOKE     DDEpoke;
  543.   SFSERVCOND  DDEcond;
  544. } DDE_SFSERVCOND, *lpDDE_SFSERVCOND;
  545.  
  546. /*---------------------------------------------------------------------------*/
  547. /*  Start Read SF                                                            */
  548. /*---------------------------------------------------------------------------*/
  549.  
  550. typedef struct tagSFDATA
  551. {
  552.   unsigned char  data[(sizeof(DDEDATA)-1)];
  553.   unsigned short uSFLength;      /* Length of SF data                        */
  554.   unsigned char  szSFData[1];    /* SF data                                  */
  555. } SFDATA;
  556.  
  557. typedef union tagDDE_SFDATA
  558. {
  559.   DDEDATA  DDEdata;
  560.   SFDATA   DDEsfdata;
  561. } DDE_SFDATA, *lpDDE_SFDATA;
  562.  
  563. /*---------------------------------------------------------------------------*/
  564. /*  Start Write SF                                                           */
  565. /*---------------------------------------------------------------------------*/
  566.  
  567. typedef struct tagWRITESF
  568. {
  569.   unsigned char  poke[(sizeof(DDEPOKE)-1)];
  570.   unsigned short uSFLength;      /* Length of SF data                        */
  571.   unsigned char  Work[8];        /* Work area                                */
  572.   unsigned char  szSFData[1];    /* SF data                                  */
  573. } WRITESF;
  574.  
  575. typedef union tagDDE_WRITESF
  576. {
  577.   DDEPOKE  DDEpoke;
  578.   WRITESF  DDEwritesf;
  579. } DDE_WRITESF, *lpDDE_WRITESF;
  580.  
  581. /*---------------------------------------------------------------------------*/
  582. /*  Change Menu Item                                                         */
  583. /*---------------------------------------------------------------------------*/
  584.  
  585. typedef struct tagChangeMenu
  586. {
  587.   unsigned char  poke[(sizeof(DDEPOKE)-1)];
  588.   HWND           hMenu;           /* Window handle of menu item              */
  589.   unsigned long  wIDNew;          /* The menu ID of the new menu item        */
  590.   unsigned short wPosition;       /* The position of the menu item           */
  591.   unsigned short wOperation;      /* Specifies the operation                 */
  592.   unsigned short wFlags;          /* Specifies the options                   */
  593.   unsigned char  szItemName[1];   /* String of the item                      */
  594. } CHANGEMENU;
  595.  
  596. typedef union tagDDE_CHANGEMENU
  597. {
  598.   DDEPOKE     DDEpoke;
  599.   CHANGEMENU  DDEmenu;
  600. } DDE_CHANGEMENU, *lpDDE_CHANGEMENU;
  601.  
  602. #define PCS_INSERT       0x0000   /* Inserts a menu item into a menu.        */
  603. #define PCS_CHANGE       0x0080   /* Modifies a menu item in a menu.         */
  604. #define PCS_APPEND       0x0100   /* Appends a menu item to the end of a menu*/
  605. #define PCS_DELETE       0x0200   /* Deletes a menu item from a menu,        */
  606.                                   /* destroying the menu item.               */
  607. #define PCS_REMOVE       0x1000   /* Removes a menu item from a menu but     */
  608.                                   /* does not destroy the menu item.         */
  609.  
  610. #define PCS_CHECKED      0x0008   /* Places a checkmark next to the item.    */
  611. #define PCS_DISABLED     0x0002   /* Disables the menu item so that it cannot*/
  612.                                   /* be selected, but does not gray it.      */
  613. #define PCS_ENABLED      0x0000   /* Enables the menu item so that it can be */
  614.                                   /* selected and restores from its grayed   */
  615.                                   /* state.                                  */
  616. #define PCS_GRAYED       0x0001   /* Disables the menu item so that it cannot*/
  617.                                   /* be selected, and grays it.              */
  618. #define PCS_MENUBARBREAK 0x0020   /* Same as PCS_MENUBREAK except that for   */
  619.                                   /* popup menus, separates the new column   */
  620.                                   /* from the old column with a vertical line*/
  621. #define PCS_MENUBREAK    0x0040   /* Plaves the item on a new line for menu  */
  622.                                   /* bar items. For popupmenus, places the   */
  623.                                   /* item in a new column, with no dividing  */
  624.                                   /* line between the columns.               */
  625. #define PCS_SEPARATOR    0x0800   /* Draws a horizontal dividing line. Can   */
  626.                                   /* only be used in a popup menu. This line */
  627.                                   /* cannot be grayed, disabled, or          */
  628.                                   /* highlighted. The wIDNew and szItemName  */
  629.                                   /* fields are ignored.                     */
  630. #define PCS_UNCHAKED     0x0000   /* Does not place a checkmark next to the  */
  631.                                   /* item (default).                         */
  632.  
  633. #define PCS_BYCOMMAND    0x0000   /* Specifies that the nPosition parameter  */
  634.                                   /* gives the menu item control ID number.  */
  635.                                   /* This is the default if neither item     */
  636.                                   /* control ID number. This is the default  */
  637.                                   /* if neither PCS_BYCOMMAND nor            */
  638.                                   /* PCS_POSITION is set.                    */
  639. #define PCS_BYPOSITION   0x0400   /* Specifies that the nPosition parameter  */
  640.                                   /* gives the position of the menu item     */
  641.                                   /* to be deleted rather than an ID number. */
  642.  
  643. /*---------------------------------------------------------------------------*/
  644. /*  Change Menu Item                                                         */
  645. /*---------------------------------------------------------------------------*/
  646.  
  647. typedef struct tagCreateMenu
  648. {
  649.   unsigned char    data[(sizeof(DDEDATA)-1)];
  650.   HWND             hMemuItem;     /* Handle of the menu item                 */
  651. } CREATEMENU;
  652.  
  653. typedef union tagDDE_CREATEMENU
  654. {
  655.   DDEDATA     DDEdata;
  656.   CREATEMENU  DDEmenu;
  657. } DDE_CREATEMENU, *lpDDE_CREATEMENU;
  658.  
  659. /*---------------------------------------------------------------------------*/
  660. /*  Start Menu Advise                                                        */
  661. /*---------------------------------------------------------------------------*/
  662.  
  663. typedef struct tagSELECTMENU
  664. {
  665.   unsigned char  data[(sizeof(DDEDATA)-1)];
  666.   unsigned short uIDSelected;     /* Command ID of the selected menu item    */
  667. } SELECTMENU;
  668.  
  669. typedef union tagDDE_SELECTMENU
  670. {
  671.   DDEDATA     DDEdata;
  672.   SELECTMENU  DDEmenu;
  673. } DDE_SELECTMENU, *lpDDE_SELECTMENU;
  674.  
  675. #ifdef __cplusplus
  676.   }
  677. #endif
  678.