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

  1. /* 'About' dialog box resource id */
  2. #define ABOUTBOX    1
  3. #define DLGSPY      2
  4.  
  5. #define MAXFOOLEN 200  /* Maximum string length for DebugPrintf */
  6. #define MAXLINES   50  /* Number of lines in window */
  7. #define DEBUG          /* Define debuging symbol */
  8.  
  9. #define FIRST(pTxt) ((pTxt)->iFirst)
  10. #define TOP(pTxt)   (((pTxt)->iFirst + (pTxt)->iTop) % MAXLINES)
  11. #define LAST(pTxt)  (((pTxt)->iFirst + (pTxt)->iCount-1) % MAXLINES)
  12. #define INC(x) ((x) = ++(x) % MAXLINES)
  13. #define DEC(x) ((x) = --(x) % MAXLINES)
  14. #define PAGE 10
  15. #define OFFSETX (Tdx/2)
  16. #define OFFSETY 1
  17.  
  18. #define wprintf   DebugPrintf
  19. #define vwprintf  vDebugPrintf
  20.  
  21.  
  22. long FAR PASCAL DebugWndProc(HWND, unsigned, WORD, LONG);
  23.  
  24. /*
  25.   HWND CreateDebugWindow (HWND,char *,BOOL);
  26.   HWND CreateDebugWin (HWND,char *,DWORD,WORD,WORD,WORD,WORD);
  27. */
  28.  
  29. #define NEW
  30.  
  31. #ifdef OLD
  32. int  DebugPrintf  (HWND,char *,...);
  33. int  vDebugPrintf (HWND,char *, int *);
  34. #else
  35. int  DebugPrintf  (HWND,char *, int);
  36. int  vDebugPrintf (HWND,char *, int);
  37. #endif
  38.  
  39. /* 'About' command id number */
  40. #define CMDABOUT    1
  41.  
  42. /* ID's for the SPY dialog box */
  43. #define ID_NULL    0x0000
  44. #define ID_PARENT  0x0009
  45. #define ID_CAPTION 0x0007
  46. #define ID_MODULE  0x0008
  47. #define ID_OK      0x0005
  48. #define ID_CANCEL  0x0006
  49. #define ID_MOUSE   0x0001
  50. #define ID_NC      0x0002
  51. #define ID_ALL     0x000A
  52.  
  53. /* Menu items */
  54. #define SPYON      0x0000
  55. #define SPYOFF     0x0002
  56. #define SPYSET     0x0003
  57.  
  58. /* reversed MSG minus time and pt */
  59. typedef struct {
  60.     LONG lParam;
  61.     WORD wParam;
  62.     WORD message;
  63.     HWND hwnd;
  64. } MSGR;
  65. typedef MSGR *PMSGR;
  66. typedef MSGR FAR *LPMSGR;
  67.  
  68. typedef struct {
  69.         MSG msg;
  70.         ATOM atom1;     /* either app or item atom */
  71.         ATOM atom2;     /* topic item if applicable */
  72.         union {
  73.                 WORD cf;        /* clipboard format */
  74.                 HANDLE hData;   /* local copy of data */
  75.                 WORD type;      /* ack type 0=normal 1=initiate 2=execute */
  76.         } un;
  77. } QEL;
  78.  
  79.