home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / os2sdk / os2sdk11 / tk3 / edpline / edpline.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-02-20  |  2.0 KB  |  109 lines

  1. /*
  2.     Header file for EDPLINE
  3.     Created by Microsoft Corporation, 1989
  4. */
  5.  
  6. /*
  7.     Resource Ids
  8. */
  9.  
  10. /* resources loaded via WinCreateStdWindow */
  11. #define IDR_EDPLINE    0x01
  12.  
  13.  
  14. /*
  15.     IDD - ID for Dialog boxes
  16.     IDM - ID for Menu commands
  17.     IDS - ID for String table
  18. */
  19.  
  20. /* dialogs */
  21.  
  22. #define    IDD_ABOUT     0x0100
  23.  
  24. /* menus */
  25.  
  26. #define IDM_PRIM      0x0200
  27. #define IDM_NOPRIM     0x0201
  28. #define IDM_POLYLINE     0x0202
  29. #define IDM_POLYFILLET     0x0203
  30. #define IDM_POLYSPLINE     0x0204
  31. #define IDM_POINTARC     0x0205
  32. #define    IDM_ABOUT     0x0206
  33.  
  34. #define IDM_POINTS      0x0400
  35. #define IDM_CTLPOINTS     0x0401
  36. #define IDM_CLEARALL     0x0402
  37.  
  38. /* strings */
  39.  
  40. #define IDS_TITLE        1
  41.  
  42.  
  43.  
  44.  
  45. /*
  46.     Constants
  47. */
  48.  
  49. #define MAJOR_VERSION    1
  50. #define MINOR_VERSION    1
  51.  
  52. #define CPTLMAX 20
  53. #define CCHSTR    15
  54.  
  55.  
  56.  
  57.  
  58. /*
  59.     Aspect ratio structure
  60. */
  61.  
  62. typedef struct
  63. {
  64.     LONG lHorz;
  65.     LONG lVert;
  66. } ASPECT;
  67.  
  68.  
  69.  
  70.  
  71. /*
  72.     Handy macros to eliminate some typing.
  73. */
  74.  
  75. #define TOGGLE_BOOL(x)    ((x)=(!(x)))
  76.  
  77. #ifdef INCL_WINDIALOGS
  78.  
  79. #define SET_CHECK_BOX(x, y, z)                    \
  80.     WinSendDlgItemMsg((x),(y),BM_SETCHECK,            \
  81.         MPFROM2SHORT((z),0),0L)
  82.  
  83. #define TOGGLE_MENU_ITEM(x, y, z)                \
  84.     WinSendDlgItemMsg((x), FID_MENU, MM_SETITEMATTR,    \
  85.         MPFROM2SHORT((y),TRUE),                \
  86.         MPFROM2SHORT(MIA_CHECKED,(z)?MIA_CHECKED:NULL))
  87.  
  88. #define CHECK_MENU_ITEM(x, y)                    \
  89.     WinSendDlgItemMsg((x), FID_MENU, MM_SETITEMATTR,    \
  90.         MPFROM2SHORT((y),TRUE),                \
  91.         MPFROM2SHORT(MIA_CHECKED,MIA_CHECKED))
  92.  
  93. #define UNCHECK_MENU_ITEM(x, y)                 \
  94.     WinSendDlgItemMsg((x), FID_MENU, MM_SETITEMATTR,    \
  95.         MPFROM2SHORT((y),TRUE),                \
  96.         MPFROM2SHORT(MIA_CHECKED,NULL))
  97.  
  98. #define ENABLE_MENU_ITEM(x, y)                    \
  99.     WinSendDlgItemMsg((x), FID_MENU, MM_SETITEMATTR,    \
  100.         MPFROM2SHORT((y),TRUE),                \
  101.         MPFROM2SHORT(MIA_DISABLED,NULL))
  102.  
  103. #define DISABLE_MENU_ITEM(x, y)                 \
  104.     WinSendDlgItemMsg((x), FID_MENU, MM_SETITEMATTR,    \
  105.         MPFROM2SHORT((y),TRUE),                \
  106.         MPFROM2SHORT(MIA_DISABLED,MIA_DISABLED))
  107.  
  108. #endif
  109.