home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / samples / os2 / npipe / clnpmain.h < prev    next >
C/C++ Source or Header  |  1999-05-11  |  4KB  |  110 lines

  1. /*==============================================================*\
  2.  *
  3.  *  Clnpmain.h - Sample pipe application main header file
  4.  *      Copyright 1991 IBM Corp.
  5.  *
  6.  *--------------------------------------------------------------
  7.  *
  8.  *  This header file contains the application wide constants
  9.  *  and structure definitions.
  10.  *
  11. \*==============================================================*/
  12.  
  13. #define IDR_MAIN       1      /* resource identifier */
  14.  
  15. /*--------------------------------------------------------------*\
  16.  *  Standard Dialog box ids
  17. \*--------------------------------------------------------------*/
  18.  
  19. #define MSGBOXID        1001
  20. #define IDD_ABOUTBOX    1002
  21. #define IDD_SERVER      1003
  22.  
  23.  
  24. /*--------------------------------------------------------------*\
  25.  *  Menu item ids
  26. \*--------------------------------------------------------------*/
  27. #define IDM_FILE                            1000
  28. #define IDM_FILESTART                       1100
  29. #define IDM_FILEEXIT                        1800
  30.  
  31. #define IDM_HELP                            9000
  32. #define IDM_HELPHELPFORHELP                 9100
  33. #define IDM_HELPEXTENDED                    9200
  34. #define IDM_HELPKEYS                        9300
  35. #define IDM_HELPINDEX                       9400
  36. #define IDM_HELPTUTORIAL                    9500
  37. #define IDM_HELPABOUT                       9600
  38.  
  39. #define IDM_OPTION                          3000
  40. #define IDM_OPTIONSWAPPIECES                3100
  41.  
  42.  
  43. /*--------------------------------------------------------------*\
  44.  *  Dialog item ids
  45. \*--------------------------------------------------------------*/
  46. #define ID_OK               1
  47. #define ID_CANCEL           2
  48.  
  49. #define IDC_OK              1
  50. #define DID_PIPE_SVR        3
  51. #define IDC_ICON            4
  52. #define DID_TEXT            5
  53.  
  54. /*--------------------------------------------------------------*\
  55.  *  Stringtable ids
  56. \*--------------------------------------------------------------*/
  57. #define IDS_APPNAME                 1
  58. #define IDS_HELPLIBRARYNAME         2
  59. #define IDS_HELPWINDOWTITLE         3
  60. #define IDS_TITLEBARSEPARATOR       4
  61.  
  62. /*--------------------------------------------------------------*\
  63.  *  Messagetable ids
  64. \*--------------------------------------------------------------*/
  65. #define IDMSG_INITFAILED                1
  66. #define IDMSG_MAINWINCREATEFAILED       2
  67. #define IDMSG_HELPLOADERROR             3
  68. #define IDMSG_CANNOTLOADSTRING          4
  69. #define IDMSG_HELPDISPLAYERROR          5
  70. #define IDMSG_CLIENT_WIN                6
  71. #define IDMSG_SERVER_WIN                7
  72. #define IDMSG_CREATE_SEM_FAILED         8
  73. #define IDMSG_CREATE_THREAD_FAILED      9
  74. #define IDMSG_PIPE_WRITE_FAILED        10
  75. #define IDMSG_PIPE_READ_FAILED         11
  76. #define IDMSG_SEMAPHORE_ERROR          12
  77. #define IDMSG_ME_FIRST                 13
  78. #define IDMSG_CONNECT_FAILED           14
  79. #define IDMSG_DRAW                     15
  80. #define IDMSG_INVALID_NAME             16
  81.  
  82. /*--------------------------------------------------------------*\
  83.  *  Ids of messages used between threads (non-pipe related)
  84. \*--------------------------------------------------------------*/
  85.  
  86. #define WM_MSG                  WM_USER+0
  87.  
  88. /*--------------------------------------------------------------*\
  89.  *  Other constants
  90. \*--------------------------------------------------------------*/
  91. #define TITLE_LEN          124
  92. #define TITLESEPARATORLEN    4
  93. #define MAX_MESSAGES       255
  94. #define MESSAGE_LEN         64
  95.  
  96. /* return values for initialization routines */
  97. #define RETURN_SUCCESS      0   /* successful return in DosExit */
  98. #define RETURN_ERROR        1   /* error return in DosExit */
  99. #define BEEP_WARN_FREQ      60  /* frequency of warning beep */
  100. #define BEEP_WARN_DUR      100  /* duration of warning beep */
  101.  
  102.  
  103. #ifndef max
  104. #define max(a,b) (((a) > (b))?(a):(b))
  105. #endif
  106.  
  107. #ifndef min
  108. #define min(a,b) (((a) < (b))?(a):(b))
  109. #endif
  110.