home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / TOOLKIT / OS2 / QUEUES / SVRQMAIN.H < prev    next >
C/C++ Source or Header  |  1994-11-17  |  4KB  |  111 lines

  1. /*==============================================================*\
  2.  *
  3.  *  Main.h - Sample PM 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.  
  21.  
  22. /*--------------------------------------------------------------*\
  23.  *  Menu item ids
  24. \*--------------------------------------------------------------*/
  25. #define IDM_FILE                            1000
  26. #define IDM_FILEEXIT                        1800
  27.  
  28. #define IDM_HELP                            9000
  29. #define IDM_HELPHELPFORHELP                 9100
  30. #define IDM_HELPEXTENDED                    9200
  31. #define IDM_HELPKEYS                        9300
  32. #define IDM_HELPINDEX                       9400
  33. #define IDM_HELPTUTORIAL                    9500
  34. #define IDM_HELPABOUT                       9600
  35.  
  36. #define IDM_OPTION                          3000
  37. #define IDM_OPTIONPURGE                     3100
  38.  
  39.  
  40. /*--------------------------------------------------------------*\
  41.  *  Dialog item ids
  42. \*--------------------------------------------------------------*/
  43. #define ID_OK               1
  44. #define ID_CANCEL           2
  45.  
  46. /*--------------------------------------------------------------*\
  47.  *  Stringtable ids
  48. \*--------------------------------------------------------------*/
  49. #define IDS_APPNAME                 2
  50. #define IDS_HELPLIBRARYNAME         3
  51. #define IDS_HELPWINDOWTITLE         6
  52. #define IDS_TITLEBARSEPARATOR      10
  53.  
  54. /*--------------------------------------------------------------*\
  55.  *  Messagetable ids
  56. \*--------------------------------------------------------------*/
  57. #define IDMSG_INITFAILED                1
  58. #define IDMSG_MAINWINCREATEFAILED       2
  59. #define IDMSG_HELPLOADERROR            10
  60. #define IDMSG_CANNOTLOADSTRING         11
  61. #define IDMSG_HELPDISPLAYERROR         13
  62. #define IDMSG_MEM_ALLOC_FAILED         25
  63. #define IDMSG_CREATE_Q_FAILED          26
  64. #define IDMSG_CREATE_SEM_FAILED        27
  65. #define IDMSG_CREATE_THREAD_FAILED     28
  66. #define IDMSG_CLIENTS_HUNG             29
  67. #define IDMSG_Q_SEMAPHORE_ERROR        30
  68. #define IDMSG_READ_Q_ERROR             31
  69. #define IDMSG_CANNOT_EXEC_CLIENT       17
  70.  
  71. /*--------------------------------------------------------------*\
  72.  *  Ids of messages used between threads
  73. \*--------------------------------------------------------------*/
  74. #define WM_NEWQMSG                          WM_USER+0
  75. #define WM_MSG                              WM_USER+1
  76.  
  77.  
  78. /*--------------------------------------------------------------*\
  79.  *  Other constants
  80. \*--------------------------------------------------------------*/
  81. #define TITLE_LEN           50
  82. #define TITLESEPARATORLEN   4
  83. #define MESSAGE_LEN  256          /* maximum length for messages */
  84. #define MAX_MESSAGES 250
  85.  
  86. /* return values for initialization routines */
  87. #define RETURN_SUCCESS      0   /* successful return in DosExit */
  88. #define RETURN_ERROR        1   /* error return in DosExit */
  89. #define BEEP_WARN_FREQ      60  /* frequency of warning beep */
  90. #define BEEP_WARN_DUR      100  /* duration of warning beep */
  91.  
  92. /* data types for passing queue data between threads */
  93.  
  94. #ifdef INCL_DOSQUEUES
  95. struct _THREADPARAM {
  96.    PID  pidParent;
  97.    HWND hwndParent;
  98.    };
  99.  
  100. typedef struct _THREADPARAM THREADPARAM;
  101.  
  102. struct _QDATA {
  103.    CHAR   pszMsg[MESSAGE_LEN];
  104.    PID    pidProcess;
  105.    ULONG  usPriority;
  106.    };
  107.  
  108. typedef struct _QDATA QDATA;
  109.  
  110. #endif
  111.