home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / template.zip / MAIN.H < prev    next >
Text File  |  1998-04-20  |  5KB  |  135 lines

  1. /**************************************************************************
  2.  *  File name  :  main.h
  3.  *
  4.  *  Description:  This header file contains the application wide
  5.  *                constants and structure definitions.
  6.  *
  7.  *  Concepts   :  [none]
  8.  *
  9.  *  API's      :  [none]
  10.  *
  11.  *  Required
  12.  *    Files    :  [none]
  13.  *
  14.  *  Copyright (C) 1991 IBM Corporation
  15.  *
  16.  *      DISCLAIMER OF WARRANTIES.  The following [enclosed] code is
  17.  *      sample code created by IBM Corporation. This sample code is not
  18.  *      part of any standard or IBM product and is provided to you solely
  19.  *      for  the purpose of assisting you in the development of your
  20.  *      applications.  The code is provided "AS IS", without
  21.  *      warranty of any kind.  IBM shall not be liable for any damages
  22.  *      arising out of your use of the sample code, even if they have been
  23.  *      advised of the possibility of such damages.                                                    *
  24.  *************************************************************************/
  25.  
  26. #define IDR_MAIN       1      /* resource identifier */
  27.  
  28. /*
  29.  *  Standard Dialog box ids
  30.  */
  31. #define FILEOPEN        2000
  32. #define FILESAVE        2001
  33.  
  34. #define MSGBOXID        1001
  35. #define OBJECTID        1002
  36.  
  37. /*
  38.  *  Menu item ids
  39.  */
  40. #define IDM_FILE                            1000
  41. #define IDM_FILENEW                         1100
  42. #define IDM_FILEOPEN                        1200
  43. #define IDM_FILESAVE                        1300
  44. #define IDM_FILESAVEAS                      1400
  45.  
  46. #define IDM_EDIT                            2000
  47. #define IDM_EDITUNDO                        2100
  48. #define IDM_EDITCUT                         2200
  49. #define IDM_EDITCOPY                        2300
  50. #define IDM_EDITPASTE                       2400
  51. #define IDM_EDITCLEAR                       2500
  52.  
  53. #define IDM_HELP                            9000
  54. #define IDM_HELPUSINGHELP                   9100
  55. #define IDM_HELPGENERAL                     9200
  56. #define IDM_HELPKEYS                        9300
  57. #define IDM_HELPINDEX                       9400
  58. #define IDM_HELPTUTORIAL                    9500
  59. #define IDM_HELPPRODUCTINFO                 9600
  60.  
  61. /*
  62.  *  Dialog item ids
  63.  */
  64. #define ID_OK               1
  65. #define ID_CANCEL           2
  66.  
  67. /*
  68.  *  Stringtable ids
  69.  */
  70. #define IDS_FILEOPENEXT             1
  71. #define IDS_APPNAME                 2
  72. #define IDS_HELPLIBRARYNAME         3
  73. #define IDS_OPEN                    4
  74. #define IDS_HELPWINDOWTITLE         5
  75. #define IDS_SAVE                    6
  76. #define IDS_UNTITLED                7
  77. #define IDS_TITLEBARSEPARATOR       8
  78. #define IDS_OBJECTCLASS             9
  79.  
  80. /*
  81.  *  Messagetable ids
  82.  */
  83. #define IDMSG_INITFAILED                1
  84. #define IDMSG_MAINWINCREATEFAILED       2
  85. #define IDMSG_CANNOTOPENINPUTFILE       3
  86. #define IDMSG_CANNOTOPENOUTPUTFILE      4
  87. #define IDMSG_CANNOTRUNCOLOR            8
  88. #define IDMSG_CANNOTGETHPS              9
  89. #define IDMSG_HELPLOADERROR            10
  90. #define IDMSG_CANNOTLOADSTRING         11
  91. #define IDMSG_CANNOTOPENPRINTER        12
  92. #define IDMSG_HELPDISPLAYERROR         13
  93. #define IDMSG_CANNOTLOADEXITLIST       14
  94. #define IDMSG_PRINTINITFAILED          15
  95. #define IDMSG_OVERWRITEFILE            16
  96. #define IDMSG_PRINTERROR               17
  97. #define IDMSG_UNDOFAILED               18
  98. #define IDMSG_CANNOTGETFILEINFO        19
  99. #define IDMSG_CANNOTALLOCATEMEMORY     20
  100. #define IDMSG_CANNOTREADFILE           21
  101. #define IDMSG_CANNOTWRITETOFILE        22
  102. #define IDMSG_CANNOTLOADFONTS          23
  103. #define IDMSG_CANNOTGETPAGEINFO        24
  104. #define IDMSG_YOURTUTORIAL             25
  105.  
  106. /*
  107.  *  Ids of messages used between threads
  108.  */
  109. #define TM_THREADINITFAILED         WM_USER+300
  110.  
  111. /*
  112.  *  Other constants
  113.  */
  114. #define MESSAGELEN          50    /* maximum length for messages */
  115. #define TITLESEPARATORLEN   4
  116.  
  117. /* return values for initialization routines */
  118. #define RETURN_SUCCESS      0   /* successful return in DosExit */
  119. #define RETURN_ERROR        1   /* error return in DosExit */
  120. #define BEEP_WARN_FREQ      60  /* frequency of warning beep */
  121. #define BEEP_WARN_DUR      100  /* duration of warning beep */
  122.  
  123.  
  124. /*
  125.  *  Included in the sample template is code for that creates a
  126.  *  second thread that can be used for background processing.
  127.  *  To use this thread, enable the BACKGROUND_THREAD constant.
  128.  *  This will enable the routines that create and destroy the
  129.  *  background processing thread.  The routines for the thread
  130.  *  itself are located in the thrd.c file.
  131.  */
  132.  
  133. #define BACKGROUND_THREAD
  134. /***************************  End of main.h  ****************************/
  135.