home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / win_lrn / dde / ddeapp / ddeapp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-10-12  |  5.7 KB  |  211 lines

  1.  
  2.  
  3. /* DDE window messages */
  4.  
  5. #define WM_DDE_FIRST    0x03e0
  6. #define WM_DDE_INITIATE (WM_DDE_FIRST+0)
  7. #define WM_DDE_TERMINATE (WM_DDE_FIRST+1)
  8. #define WM_DDE_ADVISE   (WM_DDE_FIRST+2)
  9. #define WM_DDE_UNADVISE (WM_DDE_FIRST+3)
  10. #define WM_DDE_ACK      (WM_DDE_FIRST+4)
  11. #define WM_DDE_DATA     (WM_DDE_FIRST+5)
  12. #define WM_DDE_REQUEST  (WM_DDE_FIRST+6)
  13. #define WM_DDE_POKE     (WM_DDE_FIRST+7)
  14. #define WM_DDE_EXECUTE  (WM_DDE_FIRST+8)
  15. #define WM_DDE_LAST     (WM_DDE_FIRST+8)
  16. #define WM_DDE_TEST     (WM_DDE_LAST+1)
  17.  
  18.  
  19. /*----------------------------------------------------------------------------
  20. |       DDELN structure
  21. |
  22. |       WM_DDE_ADVISE (which is really a 'link') parameter structure
  23. |
  24. |       Fields:
  25. |               fAckReq
  26. |               fDeferUpd
  27. |               cf
  28. ----------------------------------------------------------------------------*/
  29. typedef struct {
  30.         unsigned unused:13,
  31.                  fRelease:1,
  32.                  fDeferUpd:1,
  33.                  fAckReq:1;
  34.         int cf;
  35. } DDELN;
  36.  
  37.  
  38. /*----------------------------------------------------------------------------
  39. |       DDEUP structure
  40. |
  41. |       WM_DDE_DATA parameter structure.  The actual size of this
  42. |       structure depends on the size of the rgb array.
  43. |
  44. |       Fields:
  45. |               fAckReq
  46. |               fRelease
  47. |               cf
  48. |               rgb
  49. ----------------------------------------------------------------------------*/
  50. typedef struct {
  51.         unsigned unused2:12,
  52.                  fAck:1,
  53.                  fRelease:1,
  54.                  fReserved:1,
  55.                  fAckReq:1;
  56.         int cf;
  57.         BYTE rgb[1];
  58. } DDEUP;
  59.  
  60.  
  61. /*----------------------------------------------------------------------------
  62. |       PL structure
  63. |
  64. |       The PL (pronounced "plex") structure is used to efficiently
  65. |       manipulate variable sized arrays.
  66. |
  67. |       Fields:
  68. |               iMax            number of allocated items
  69. |               cbItem          sizeof item
  70. |               dAlloc          number of items to allocate at a time
  71. |               rg              the array of items
  72. ----------------------------------------------------------------------------*/
  73. typedef struct
  74.                 {
  75.                 int iMax;
  76.                 BYTE cbItem;
  77.                 BYTE dAlloc;
  78.                 BYTE rg[1];
  79.                 }
  80.         PL;
  81.  
  82. /*----------------------------------------------------------------------------
  83. |       DEFPL macro
  84. |
  85. |       Used to define a specific plex.
  86. |
  87. |       Arguments:
  88. |               PLTYP           name of the plex type
  89. |               TYP             type of item stored in the plex
  90. |               iMax            name to use for the iMax field
  91. |               rg              name to use for the rg field
  92. ----------------------------------------------------------------------------*/
  93. #define DEFPL(PLTYP,TYP,iMax,rg) \
  94.         typedef struct \
  95.                 { \
  96.                 int iMax; \
  97.                 char cbItem; \
  98.                 char dAlloc; \
  99.                 TYP rg[1]; \
  100.                 } \
  101.             PLTYP;
  102.  
  103.  
  104. /*----------------------------------------------------------------------------
  105. |       CL structure
  106. |
  107. |       Defines the channel communication structure.
  108. |
  109. |       Fields:
  110. |               fUsed           required for use in a PL
  111. |               hwndExt         external side of the channel
  112. |               hwndInt         internal side of the channel
  113. |               fClient         if ddeapp is client side of the channel
  114. ----------------------------------------------------------------------------*/
  115. typedef struct {
  116.         BOOL fUsed;
  117.         HWND hwndExt;
  118.         HWND hwndInt;
  119.         BOOL fClient;
  120. } CL;
  121.  
  122. /*----------------------------------------------------------------------------
  123. |       PLCL
  124. |
  125. |       Plex array of channels
  126. ----------------------------------------------------------------------------*/
  127. DEFPL(PLCL, CL, iclMax, rgcl)
  128.  
  129.  
  130. /*----------------------------------------------------------------------------
  131. |       DL structure
  132. |
  133. |       Dependent link structure
  134. |
  135. |       Arguments:
  136. |               fUsed           required for use in a PL
  137. |               icl             channel for this link
  138. |               atomRef         string used in the link
  139. ----------------------------------------------------------------------------*/
  140. typedef struct {
  141.         BOOL fUsed;
  142.         int icl;
  143.         ATOM atomRef;
  144. } DL;
  145.  
  146. /*----------------------------------------------------------------------------
  147. |       PLDL
  148. |
  149. |       Plex array of dependent links
  150. ----------------------------------------------------------------------------*/
  151. DEFPL(PLDL, DL, idlMax, rgdl)
  152.  
  153.  
  154.  
  155. /* Menu and Dialog box definitions */
  156.  
  157. #define mbDde 1
  158. #define idmInitiate 256
  159. #define idmTerminate 257
  160. #define idmRequest 258
  161. #define idmPoke 259
  162. #define idmAdvise 260
  163. #define idmUnadvise 261
  164. #define idmExecute 262
  165. #define idmBench 263
  166. #define idmCBench 264
  167. #define idmPasteLink 265
  168. #define idmBug1 512
  169. #define idmBug2 513
  170. #define idmBug3 514
  171. #define idmBug4 515
  172. #define idmBug5 516
  173.  
  174. #define iddInitiate 1024
  175. #define idtxtApp 256
  176. #define idtxtDoc 257
  177.  
  178. #define iddRequest 1025
  179. #define idlboxChnl 256
  180. #define idlboxFmt 257
  181. #define idtxtRef 258
  182.  
  183. #define iddAdvise 1026
  184. #define idlboxChnl 256
  185. #define idlboxFmt 257
  186. #define idtxtRef 258
  187.  
  188. #define iddUnadvise 1027
  189. #define idlboxChnl 256
  190. #define idlboxRef 257
  191.  
  192. #define iddExecute 1028
  193. #define idlboxChnl 256
  194. #define idtxtRef 258
  195.  
  196. #define iddTerminate 1029
  197. #define idlboxChnl 256
  198.  
  199. #define iddPoke 1030
  200. #define idlboxChnl 256
  201. #define idtxtRef 258
  202. #define idtxtData 259
  203.  
  204. #define idradioText 260
  205. #define idradioCsv  261
  206. #define idradioFile 262
  207.  
  208.  
  209.  
  210.  
  211.