home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / book / rc16.inf (.txt) < prev    next >
OS/2 Help File  |  1999-05-12  |  112KB  |  4,515 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. About the Legacy Version ΓòÉΓòÉΓòÉ
  3.  
  4. This document describes the "legacy" version of the Resource Compiler (RC16). 
  5. RC16 is an obsolete level of the Resource Compiler.  It remains available for 
  6. applications that cannot utilize the newer (stricter) level of RC. 
  7.  
  8. The new version of RC (that replaces RC16) is described in the online Tools 
  9. Reference document. 
  10.  
  11.  
  12. ΓòÉΓòÉΓòÉ 2. Resource Compiler ΓòÉΓòÉΓòÉ
  13.  
  14. The OS/2 Resource Compiler (RC) is an application-development tool that lets 
  15. you add application resources, such as message strings, pointers, menus, and 
  16. dialog boxes, to the executable file of your application. The Resource Compiler 
  17. is primarily intended to prepare data for OS/2 applications that use functions 
  18. such as WinLoadString, WinLoadPointer, WinLoadMenu, and WinLoadDlg.  These 
  19. functions load resources from the executable file of your application or 
  20. another specified executable file.  The application can then use the loaded 
  21. resources as needed. 
  22.  
  23. The Resource Compiler and the resource functions let you quickly define and/or 
  24. modify application resources without recompiling the application itself.  That 
  25. is, RC can modify the resources in an executable file at any time without 
  26. affecting the rest of the file. This means that you can create custom 
  27. applications from a single executable file - you just use RC to add the custom 
  28. resources you need to each application. 
  29.  
  30. The Resource Compiler is especially important for international applications 
  31. because it lets you define all language-dependent data, such as message 
  32. strings, as resources.  Preparing the application for a new language is simply 
  33. a matter of adding new resources to the existing executable file. 
  34.  
  35. Note:  Make sure the file RCPP.EXE (the Resource Compiler preprocessor) is 
  36.        available for the use of the Resource Compiler. It can be in the current 
  37.        directory, or in a directory to which there is a path. 
  38.  
  39.  
  40. ΓòÉΓòÉΓòÉ 2.1. Command-Line Options ΓòÉΓòÉΓòÉ
  41.  
  42. The following options can be specified on the Resource Compiler command line: 
  43.  
  44.  -d <defname>[=<value>] Define macro to preprocessor 
  45.  -i <pathspec>       Include file path 
  46.  -n                  Suppress the display of the logo and the copyright 
  47.                      information 
  48.  -r                  Create .res file 
  49.  -p                  Pack - 386 resources will not cross 64K boundaries. 
  50.  -cp (or -k)  {<codepage>|<lbs,lbe>...} DBCS code page or lead byte information 
  51.  -x[{1|2}]           Exepack - compress resources, using method 1 or 2. 
  52.  -cc <countrycode>   Country code 
  53.  -w2                 Suppress the display of all warning and informational 
  54.                      messages. Errors and fatal errors continue to be 
  55.                      displayed. 
  56.  -h (or -?)          Access Help 
  57.  
  58.  Leave a blank after the letter when using option -cc, -d, -i , -cp or -k. 
  59.  Upper- or lowercase letters can be used. 
  60.  
  61.  
  62. ΓòÉΓòÉΓòÉ 2.1.1. Explanation of Command-Line Options ΓòÉΓòÉΓòÉ
  63.  
  64. The -d option is useful for passing conditional-compilation flags to the 
  65. preprocessor. The <defname> is a sequence of letters, underscore symbols, and 
  66. digits which does not begin with a digit. The <value> is a sequence of symbols 
  67. which you want to substitute for the <defname> wherever it appears in the input 
  68. script file.  If you omit the =<value>, the <defname> will be set to the 
  69. default value 1. For example, the option -d _3d is equivalent to including at 
  70. the beginning of the input file this line: 
  71.  
  72. #define   _3d     1 
  73.  
  74. You can use the -d option up to 8 times to define different macros from the 
  75. command line. 
  76.  
  77. The -i option defines paths for files to be included with the source file. The 
  78. <pathspec> is any path where you want RC to search for files included by the 
  79. preprocessor #include directive.  The <pathspec> must not contain embedded 
  80. blanks.  To include more than one path, code the -i option once for each path. 
  81. The preprocessor reads paths from the INCLUDE environment variable after 
  82. reading the paths you provide with -i options. 
  83.  
  84. The -r option will create in your current directory a binary resource file 
  85. containing the resources you compile.  The -r option takes no argument.  The 
  86. name given to this binary resource file will be the same as the name of the 
  87. input resource script file except that the extension will be .RES instead of 
  88. .RC. When you use -r, you do not bind resources to an executable file. 
  89.  
  90. The -p option is used only when binding resources to an executable.  It 
  91. positions resources so that they do not cross 64K boundaries. 
  92.  
  93. The -cp or -k option is used to specify code page information for the resource 
  94. script file to be compiled. The <codepage> is a numeric code page value. For a 
  95. list of code page values, see the code page table under COUNTRYCODE in the 
  96. online book OS/2 Warp Control Program Programming Reference. Instead of 
  97. specifying a code page, you may provide a sequence of pairs of DBCS lead byte 
  98. code points.  Each pair of numbers gives the lower and upper limit of a range 
  99. of code points which are to be interpreted as DBCS lead bytes (see DBCS Code 
  100. Pages and Country Codes for more information). The code page must be valid for 
  101. the country code in effect: either the default country code or the country 
  102. specified using the -cc option. 
  103.  
  104. The -cc option allows you to specify a country code for the resource script 
  105. file to be compiled. The <countrycode> is a number from the table under 
  106. COUNTRYCODE in the online book OS/2 Warp Control Program Programming Reference. 
  107.  
  108. The -x option is used only when binding resources to an executable.  It causes 
  109. resources to be compressed.  These resources will be decompressed automatically 
  110. when the resource is accessed. 
  111.  
  112. The -x1 option causes Resource Compiler to use the compression algorithm that 
  113. is compatible with OS/2 2.0, 2.1, and 2.11, as well as OS/2 3.0 and later. 
  114.  
  115. The -x2 option causes Resource Compiler to use a compression algorithm that is 
  116. compatible with OS/2 3.0 and later. The -x2 option will produce smaller 
  117. executable files that can access resources faster. 
  118.  
  119. -x with no number defaults to -x1. 
  120.  
  121. The -n option (nologo) causes Resource Compiler to suppress the display of the 
  122. logo and the copyright information. 
  123.  
  124. The -w2 option causes Resource Compiler to suppress the display of all warning 
  125. and informational messages. Errors and fatal errors continue to be displayed. 
  126.  
  127. The -h and -? options cause Resource Compiler to display a summary of the 
  128. available options and environment variables that it uses.  When you use these 
  129. options, Resource Compiler does not read any input files. Entering "RC16" on 
  130. the command line with no operands displays the same information. 
  131.  
  132.  
  133. ΓòÉΓòÉΓòÉ 2.1.2. Help ΓòÉΓòÉΓòÉ
  134.  
  135. To display Resource Compiler help, type RC with no parameters, at a command 
  136. prompt. The appropriate copyright statement will be displayed, along with a 
  137. list of Resource Compiler options. You can also display this list by using the 
  138. command-line options -h or -?. 
  139.  
  140. Usage:  rc16 [<options>] <.RC input file> [<.EXE output file>]
  141.    or:  rc16 [<options>] <.RES input file> [<.EXE output file>]
  142.    or:  rc16 [<options>] -r <.RC input file> [<.RES output file>]
  143.  
  144.         -d <defname>    - Preprocessor define
  145.         -D <defname>    - Preprocessor define
  146.         -i <path>       - Include file path
  147.         -r              - Create .res file
  148.         -p              - Pack - 386 resources will not cross 64K boundaries
  149.         -x[1|2]         - Exepack - Compress resources, using method 1 or 2
  150.         -cc cc          - Country code
  151.         -cp cp | lb,tb,...      - DBCS codepage or lead/trail byte info
  152.         -n              - Don't show logo
  153.         -w2             - Suppress warnings
  154.         -?              - Access Help
  155.         -h              - Access Help
  156.  
  157. Environment variables:
  158.         DBCS=cp | lb,tb,...
  159.         TMP=<temporary file path>
  160.         TEMP=<temporary file path>
  161.         INCLUDE=<include file path>; ...
  162.  
  163. Note:  Option -X2 will compress executable files that run only on OS/2 versions 
  164.        3.0 and later. 
  165.  
  166.  
  167. ΓòÉΓòÉΓòÉ 2.2. Resource Script Files ΓòÉΓòÉΓòÉ
  168.  
  169. This topic describes the resource script file used to define your application 
  170. resources and explains how to compile the file and add the resources to your 
  171. executable file. 
  172.  
  173. Use the Resource Compiler to perform the following actions: 
  174.  
  175.      Create a resource script file. 
  176.  
  177.      Compile the file. 
  178.  
  179.      Add the file to the executable file of your application (optional). 
  180.  
  181.  The following sections describe the resource script file and the RC program. 
  182.  
  183.  Resource Script Files 
  184.  
  185.  A resource script file consists of one or more resource statements that define 
  186.  the type, identifier, and data for each resource.  For example, the following 
  187.  multiple-line resource statement defines a menu to be used with an 
  188.  application: 
  189.  
  190.     MENU 1
  191.     BEGIN
  192.         MENUITEM "Alpha", 101
  193.         MENUITEM "Beta", 102
  194.     END
  195.  
  196.  A resource script file is a text file you can create by using an ordinary text 
  197.  editor.  Since some resources may contain binary data that cannot be created 
  198.  using a text editor, many resource statements let you specify additional files 
  199.  to include when compiling the resource script file. For example, the following 
  200.  statement defines an icon and specifies the file MYICON.ICO as containing the 
  201.  icon data: 
  202.  
  203.     ICON 1 myicon.ico
  204.  
  205.  Directives 
  206.  
  207.  A resource script file can also contain directives. For example, the following 
  208.  directive includes the header file OS2.H when RC processes the resource script 
  209.  file: 
  210.  
  211.     #include <os2.h>
  212.  
  213.  Resource script files typically have the .RC file extension. .RC is the 
  214.  default extension; use it for all your resource script files. 
  215.  
  216.  Note:  Although the Resource Compiler is C-like in syntax, it is not a C 
  217.         compiler. Use only the Resource Compiler statements. 
  218.  
  219.  
  220. ΓòÉΓòÉΓòÉ 2.3. Directives ΓòÉΓòÉΓòÉ
  221.  
  222. A directive is a Resource Compiler statement that carries out a task such as 
  223. including a header file, defining constants, or conditionally compiling 
  224. portions of the resource script file. 
  225.  
  226. Directives 
  227.  
  228.       elif Directive 
  229.       else Directive 
  230.       endif Directive 
  231.       if Directive 
  232.       ifdef Directive 
  233.       ifndef Directive 
  234.  
  235.  
  236. ΓòÉΓòÉΓòÉ 2.3.1. Using the Resource Compiler ΓòÉΓòÉΓòÉ
  237.  
  238. The Resource Compiler (RC) compiles a resource script file to create a new file 
  239. called a binary resource file. 
  240.  
  241. The binary resource file can be added to the executable file of the 
  242. application, replacing any existing resources in that file. 
  243.  
  244. You can start RC in any of three ways. 
  245.  
  246.      Compile and add a resource definition file to an executable file 
  247.      Compile a resource script file 
  248.      Add a binary resource file to an executable file 
  249.  
  250.  The RC command line has the following three basic forms: 
  251.  
  252.     rc16 resource-script-file [executable-file]
  253.  
  254.     rc16 resource-file [executable-file]
  255.  
  256.     rc16 -r resource-script-file [resource-file]
  257.  
  258.  Note:  The third option does not add to the executable file.
  259.  
  260.  The resource-script-file field must be the file name of the resource script 
  261.  file to be compiled.  If the file is not in the current directory, you must 
  262.  provide a full path.  If you provide a file name without specifying an 
  263.  extension, RC automatically appends the .RC extension to the name. 
  264.  
  265.  The executable-file field must be the name of the executable file to receive 
  266.  the compiled resources.  This is a file having an extension of either .EXE or 
  267.  .DLL.  If the file is not in the current directory, you must provide a full 
  268.  path.  If you omit the executable-file field, RC adds the compiled resources 
  269.  to the executable file that has the same name as the resource script file but 
  270.  which has the .EXE file extension.  If you specify the executable-file field 
  271.  but omit the extension, RC will append the .EXE extension.  If this executable 
  272.  file does not exist, RC displays an error message. 
  273.  
  274.  The -r option directs RC to compile the resource script file without adding it 
  275.  to an executable file.  You can use this option to prepare a binary resource 
  276.  file that you can add to an executable file at a later time.  If you do not 
  277.  explicitly name a binary resource file along with the -r option, RC uses the 
  278.  same name as the resource script file but with the .RES extension. 
  279.  
  280.  The resource-file field must be the name of the binary resource file to be 
  281.  added to the executable file.  If the binary resource file does not already 
  282.  exist, RC creates it; otherwise, RC replaces the existing file.  If the file 
  283.  is not in the current directory, you must provide a full path.  The binary 
  284.  resource file must have the .RES extension. 
  285.  
  286.  For example, to compile the resource script file EXAMPLE.RC, and add the 
  287.  result to the executable file EXAMPLE.EXE, use the following command: 
  288.  
  289.     rc16 example
  290.  
  291.  You do not need to specify the .RC extension. RC creates the binary resource 
  292.  file EXAMPLE.RES and adds the compiled resource to the executable file 
  293.  EXAMPLE.EXE. 
  294.  
  295.  To compile the resource script file EXAMPLE.RC into a binary resource file 
  296.  without adding the resources to an executable file, use the following command: 
  297.  
  298.     rc16 -r example
  299.  
  300.  The compiler creates the binary resource file EXAMPLE.RES. To create a binary 
  301.  resource file that has a name different from the resource script file, use the 
  302.  following command: 
  303.  
  304.     rc16 -r example newfile.res
  305.  
  306.  To add the compiled resources in the binary resource file EXAMPLE.RES to an 
  307.  executable file, use the following command: 
  308.  
  309.     rc16 example.res
  310.  
  311.  To specify the name of the executable file, if the name is different from the 
  312.  resource file, use the following command: 
  313.  
  314.     rc16 example.res newfile.exe
  315.  
  316.  To add the compiled resources to a dynamic-link-library (.DLL) file, use the 
  317.  following command: 
  318.  
  319.     rc16 example.res dynalink.dll
  320.  
  321.  
  322. ΓòÉΓòÉΓòÉ 2.3.2. DBCS Code Pages and Country Codes ΓòÉΓòÉΓòÉ
  323.  
  324. In addition to -r, RC offers two other command-line options: -cp and -cc.  The 
  325. -cp option lets you specify a code-page identifier or DBCS lead byte 
  326. information. The -cc option lets you specify a country code. The syntax is as 
  327. follows: 
  328.  
  329.   -cp {codepage-id | lead-byte-start, lead-byte-end,...}
  330.   -cc country-code
  331.  
  332. The lead-byte-start and lead-byte-end fields give the lower and upper limits of 
  333. each interval of DBCS lead bytes which you are defining for the code page. The 
  334. valid range for the lower and upper limit is 128 to 255. The number values in 
  335. the pair should be separated by a comma. You may specify these values instead 
  336. of a codepage-id. For example: 
  337.  
  338.    -cp 140,150
  339.  
  340. The codepage-id or country-code field contains a valid code page or country 
  341. code. For a complete list of supported code pages and country codes, see the 
  342. code page table under COUNTRYCODE in the online book OS/2 Warp Control Program 
  343. Programming Guide and Reference. 
  344.  
  345.  
  346. ΓòÉΓòÉΓòÉ 2.4. Defining Constants ΓòÉΓòÉΓòÉ
  347.  
  348. The -d option lets you define up to eight symbolic constants on the command 
  349. line.  The syntax is as follows: 
  350.  
  351.   -d defname[=value]
  352.  
  353. In the previous example, defname is a name, and value is an integer constant, 
  354. or an expression. The -d option is useful for passing conditional-compilation 
  355. flags to the RC preprocessor. 
  356.  
  357. The following example specifies a Japanese code-page identifier and also 
  358. defines two symbolic constants to be passed to the preprocessor as 
  359. conditional-compilation flags. 
  360.  
  361.   rc16 -cp 932 -d DEBUG -d VERSION=2 example
  362.  
  363. Note:  To process directives in the resource script file, RC uses the files 
  364. RCPP.EXE and RCPP.ERR.  Be sure that these files are in the current directory 
  365. or in a directory specified by your PATH environment variable.  RC creates many 
  366. temporary files and writes them to the directory indicated by the TMP or TEMP 
  367. environment variable.  If RC cannot write these temporary files to this 
  368. directory, it writes them to the current directory. 
  369.  
  370.  
  371. ΓòÉΓòÉΓòÉ 2.4.1. About Resource Statements ΓòÉΓòÉΓòÉ
  372.  
  373. Each resource statement consists of one or more keywords, numbers, character 
  374. strings, constants, or file names.  You combine these to define the resource 
  375. type, identifier, and data. 
  376.  
  377. Keywords are words that have a special meaning to the Resource Compiler. In a 
  378. statement, keywords specify the resource type, the load and memory options, and 
  379. the beginning and end of nested statements. You can use the RC keywords only as 
  380. specified in the statement syntax. 
  381.  
  382. Keywords, except for those specifying directives, can be any combination of 
  383. uppercase and lowercase letters.  Note that the curly braces, { and }, are 
  384. reserved characters.  You can use them in place of the BEGIN and END keywords. 
  385.  
  386. Numbers are integers that represent coordinates, dimensions, styles, and other 
  387. numeric data.  You can specify numbers in decimal, octal, or hexadecimal 
  388. notation: 
  389.  
  390.       Decimal numbers must contain decimal digits but can start with a minus 
  391.       sign (-) when they represent a negative number. 
  392.       Hexadecimal numbers must contain hexadecimal digits (uppercase or 
  393.       lowercase) and must start with the characters 0x. 
  394.       Octal numbers are similar to hexadecimal numbers, except that a lowercase 
  395.       letter o replaces the x. 
  396.  
  397.  The following example shows several numbers represented in decimal, octal, and 
  398.  hexadecimal notation: 
  399.  
  400.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  401.   ΓöéDECIMAL             ΓöéOCTAL               ΓöéHEXADECIMAL         Γöé
  402.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  403.   Γöé1                   Γöé0o1                 Γöé0x1                 Γöé
  404.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  405.   Γöé10                  Γöé0o12                Γöé0xA                 Γöé
  406.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  407.   Γöé255                 Γöé0o377               Γöé0xFF                Γöé
  408.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  409.   Γöé-1                  Γöé0o177777            Γöé0xFFFF              Γöé
  410.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  411.   Γöé65535               Γöé0o177777            Γöé0xFFFF              Γöé
  412.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  413.  
  414.  Statements that create controls in dialog windows and menu items in menus 
  415.  require that you specify an identifier for each control or menu item. 
  416.  Statements that create controls also require you to specify coordinates and 
  417.  dimensions. 
  418.  
  419.  Identifiers, coordinates, and dimensions are specified using integer values. 
  420.  Each supports a slightly different range of values. Identifiers and 
  421.  coordinates can use either signed or unsigned values;  dimensions only use 
  422.  unsigned values. Coordinates and dimensions can use unsigned values from 0 
  423.  through 65535;  identifiers support unsigned values from 1 through 65535. In 
  424.  addition, identifiers can be character strings as well as numeric values. 
  425.  
  426.  The ranges specific to each are listed in the following table. 
  427.  
  428.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  429.   Γöé               ΓöéSigned Range        ΓöéUnsigned Range ΓöéStrings   Γöé
  430.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  431.   ΓöéIdentifiers    Γöé-32768 through 32767Γöé1 through 65535ΓöéYes       Γöé
  432.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  433.   ΓöéCoordinates    Γöé-32768 through 32767Γöé0 through 65535ΓöéNo        Γöé
  434.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  435.   ΓöéDimensions     ΓöéNot applicable      Γöé0 through 65535ΓöéNo        Γöé
  436.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  437.  
  438.  You can also use simple expressions that evaluate to a value in the 
  439.  appropriate range;  this enables you to, for example, specify dimensions or 
  440.  coordinates that are relative to those of a corresponding dialog window or 
  441.  menu. A resource identifiers encoded as an expression must resolve to an 
  442.  unsigned integer, not a string. 
  443.  
  444.  Character strings represent names, labels, titles, and messages. A character 
  445.  string consists of one or more characters enclosed in double quotation marks. 
  446.  Character values must be in the range 1 through 255. If a double quotation 
  447.  mark (") is required in a string, you must include the double quotation mark 
  448.  twice. The meaning of each character value (that is, the character each value 
  449.  represents) depends on the code page (character set) defined for the resource 
  450.  script file. 
  451.  
  452.  The Resource Compiler interprets the backslash (\) as an escape character in 
  453.  character strings.  You can include any ASCII character in a character string 
  454.  by specifying either \xdd, where dd is the hexadecimal representation of an 
  455.  ASCII character, or \nnn, where nnn is the octal representation of an ASCII 
  456.  character.  If a backslash is required in a string, you must include the 
  457.  backslash twice. 
  458.  
  459.  In addition, when character strings are used as resource identifiers 
  460.  additional rules apply: 
  461.  
  462.      They must be enclosed in double quotation marks ("). If a double 
  463.       quotation mark is needed inside the string, it is encoded as two double 
  464.       quotation marks in a row. 
  465.  
  466.      They cannot contain any character larger than 0x7F. 
  467.  
  468.      They must be delimited by whitespace, just as an integer ID is. 
  469.  
  470.      Resources whose resource ID is compiled into a 16-bit value in the binary 
  471.       data area, such as MENUITEM with its menu-id field, or HELPSUBITEM with 
  472.       its child-window-id field, cannot use character strings for IDs. 
  473.  
  474.      They can contain an embedded newline character by continuing the string 
  475.       on the following line without closing the string. When the input file 
  476.       represents newlines as 0x0D+0x0A or by 0x0D+0x0D+0x0A, the string is 
  477.       compiled with the sequence 0x0A to represent the newline. 
  478.  
  479.      Duplicate string IDs are not permitted for resources of the same type. 
  480.       However, the same string resource identifier can be used to identify 
  481.       resources of different types. 
  482.  
  483.       When the Resource Compiler is compiling a script file and encounters more 
  484.       than one resource of the same type having the same string ID, it will 
  485.       generate an error message and stop compiling the file. When the Resource 
  486.       Compiler is binding a .RES file and encounters more than one resource of 
  487.       the same type with the same string ID, it will generate a warning message 
  488.       and ignore the second resource identifier;  only the first resource 
  489.       having the duplicated identifier will be bound to the file. 
  490.  
  491.  Constants are names that have been assigned values by using the define 
  492.  directive.  A constant can represent a number, a character string, or other 
  493.  data.  Most resource statements in a resource script file use constants, and 
  494.  many use the constants defined in the OS/2 header files (for example, os2.h). 
  495.  For this reason, you should always use the include directive to include OS2.H 
  496.  in your resource script file. 
  497.  
  498.  File names are OS/2 file names.  If the specified file is not in the current 
  499.  directory, you must specify the drive, directory, and file name. 
  500.  
  501.  Resource statements have three basic forms: 
  502.  
  503.       Single-line statements 
  504.       Multiple-line statements 
  505.       Directives 
  506.  
  507.  Single-line statements consist of a keyword identifying the resource type, a 
  508.  number or character string which specifies the resource identifier, and a file 
  509.  name specifying the file containing the resource data. For example, this ICON 
  510.  statement defines an icon resource: 
  511.  
  512.     ICON 1 myicon.ico
  513.  
  514.  The icon resource has the icon identifier 1. The file MYICON.ICO contains the 
  515.  icon data. The same example, using character strings for identifiers is shown 
  516.  below: 
  517.  
  518.     ICON "MyIcon" myicon.ico
  519.  
  520.  Multiple-line statements consist of a keyword identifying the resource type, a 
  521.  number or character string which specifies the resource identifier, and, 
  522.  between the BEGIN and END keywords, additional resource statements that define 
  523.  the resource data. For example, this MENU statement defines a menu resource: 
  524.  
  525.     MENU 1
  526.     BEGIN
  527.         MENUITEM "Alpha", 101
  528.         MENUITEM "Beta",  102
  529.     END
  530.  
  531.  The menu identifier is 1.  The menu contains two MENUITEM statements that 
  532.  define the contents of the menu. 
  533.  
  534.  In multiple-line statements such as DLGTEMPLATE and WINDOWTEMPLATE, RC allows 
  535.  any level of nested statements.  For example, the DLGTEMPLATE and 
  536.  WINDOWTEMPLATE statements typically contain a single DIALOG or FRAME 
  537.  statement.  These statements can contain any number of WINDOW and CONTROL 
  538.  statements; the WINDOW and CONTROL statements can contain additional WINDOW 
  539.  and CONTROL statements; and so on.  The nested statements let you define 
  540.  controls and other child windows for the dialog boxes and windows.  If a 
  541.  nested statement creates a child window or control, the parent and owner of 
  542.  the new window is the window created by the containing statement.  (FRAME 
  543.  statements occasionally create frame controls whose parent and owner windows 
  544.  are not the same.) 
  545.  
  546.  Directives consist of the reserved character # in the first column of a line, 
  547.  followed by the directive keyword and any additional numbers, character 
  548.  strings, or file names. 
  549.  
  550.  
  551. ΓòÉΓòÉΓòÉ 2.4.2. Binary Resource Files ΓòÉΓòÉΓòÉ
  552.  
  553. The binary resource file created by the Resource Compiler consists of one or 
  554. more resource entries, each in the following form: 
  555.  
  556.   struct {
  557.       UCHAR  fResType;
  558.       USHORT usResType;
  559.       union {
  560.           struct {
  561.               UCHAR  fResID;
  562.               USHORT resid;
  563.           };
  564.           UCHAR resname[];
  565.       };
  566.       USHORT fsOptions;
  567.       ULONG  cb;
  568.       BYTE   bytes[1];
  569.   };
  570.  
  571. The fields in each entry have the following meanings: 
  572.  
  573.  fRestype              Specifies whether the resource-type identifier is a 
  574.                        string or an integer. For OS/2, the resource type is 
  575.                        always an integer and this field is set to 0xFF. 
  576.  
  577.  usResType             Specifies the resource-type identifier. This value is a 
  578.                        signed integer in the range -32768 through 32767, an 
  579.                        unsigned integer in the range of 1 through 65535, or a 
  580.                        character string. The following resource types are 
  581.                        predefined: 
  582.  
  583.                        RT_ACCELTABLE              Accelerator table 
  584.                        RT_BITMAP                  Bitmap 
  585.                        RT_CHARTBL                 Character table 
  586.                        RT_DIALOG                  Dialog template 
  587.                        RT_DISPLAYINFO             Display information 
  588.                        RT_DLGINCLUDE              Dialog include-file name 
  589.                        RT_FKALONG                 Long-form function-key area 
  590.                        RT_FKASHORT                Short-form function-key area 
  591.                        RT_FONT                    Font 
  592.                        RT_FONTDIR                 Font directory 
  593.                        RT_HELPSUBTABLE            Help subtable 
  594.                        RT_HELPTABLE               Help table 
  595.                        RT_KEYTBL                  Key table 
  596.                        RT_MENU                    Menu template 
  597.                        RT_MESSAGE                 Error-message table 
  598.                        RT_POINTER                 Mouse-pointer shape 
  599.                        RT_RCDATA                  Binary data 
  600.                        RT_STRING                  String table 
  601.                        RT_VKEYTBL                 Virtual key table 
  602.                        RT_RESNAMES                String ID table 
  603.  
  604.  fResID                Specifies whether the resource identifier is a string or 
  605.                        an integer. For the OS/2 operating system, this field is 
  606.                        set to 0xFF to indicate that the resource identifier is 
  607.                        an integer. 
  608.  
  609.  resid                 Specifies the resource identifier. This value is an 
  610.                        unsigned integer in the range of 1 through 65535. 
  611.  
  612.  resname               Specifies a string resource identifier as a sequence of 
  613.                        characters ending with a 0x00 value. 
  614.  
  615.  fsOptions             Specifies the load and memory options.  This value can 
  616.                        be a combination of the following: 
  617.  
  618.                        0x0010           MOVEABLE resource.  If not given, the 
  619.                                         resource is FIXED. 
  620.                        0x0040           PRELOAD resource.  If not given, the 
  621.                                         resource is LOADONCALL. 
  622.                        0x1000           DISCARDABLE resource. 
  623.  
  624.  cb                    Specifies the size of the resource (in bytes). 
  625.  
  626.  bytes                 Contains the resource. 
  627.  
  628.  Note:  There is a size limitation of 65280 bytes for a binary resource file. 
  629.  
  630.  
  631. ΓòÉΓòÉΓòÉ 2.5. Statements ΓòÉΓòÉΓòÉ
  632.  
  633. The following statements and directives are used by the Resource Compiler (RC): 
  634.  
  635.       ACCELTABLE Statement 
  636.       ASSOCTABLE Statement 
  637.       AUTOCHECKBOX Statement 
  638.       AUTORADIOBUTTON Statement 
  639.       BITMAP Statement 
  640.       CHECKBOX Statement 
  641.       CODEPAGE Statement 
  642.       COMBOBOX Statement 
  643.       CONTAINER Statement 
  644.       CONTROL Statement 
  645.       CTEXT Statement 
  646.       CTLDATA Statement 
  647.       DEFAULTICON Statement 
  648.       define Directive 
  649.       DEFPUSHBUTTON Statement 
  650.       DIALOG Statement 
  651.       DLGINCLUDE Statement 
  652.       DLGTEMPLATE Statement 
  653.       EDITTEXT Statement 
  654.       elif Directive 
  655.       else Directive 
  656.       endif Directive 
  657.       ENTRYFIELD Statement 
  658.       FONT Statement 
  659.       FRAME Statement 
  660.       GROUPBOX Statement 
  661.       HELPITEM Statement 
  662.       HELPSUBITEM Statement 
  663.       HELPSUBTABLE Statement 
  664.       HELPTABLE Statement 
  665.       ICON Statement (Resource) 
  666.       ICON Statement (Control) 
  667.       if Directive 
  668.       ifdef Directive 
  669.       ifndef Directive 
  670.       include Directive 
  671.       LISTBOX Statement 
  672.       LTEXT Statement 
  673.       MENU Statement 
  674.       MENUITEM Statement 
  675.       MESSAGETABLE Statement 
  676.       MLE Statement 
  677.       NOTEBOOK Statement 
  678.       POINTER Statement 
  679.       PRESPARAMS Statement 
  680.       PUSHBUTTON Statement 
  681.       RADIOBUTTON Statement 
  682.       RCDATA Statement 
  683.       RCINCLUDE Statement 
  684.       RESOURCE Statement 
  685.       RTEXT Statement 
  686.       SLIDER Statement 
  687.       SPINBUTTON Statement 
  688.       STRINGTABLE Statement 
  689.       SUBITEMSIZE Statement 
  690.       SUBMENU Statement 
  691.       undef Directive 
  692.       VALUESET Statement 
  693.       WINDOW Statement 
  694.       WINDOWTEMPLATE Statement 
  695.  
  696.  
  697. ΓòÉΓòÉΓòÉ 2.5.1. ACCELTABLE Statement ΓòÉΓòÉΓòÉ
  698.  
  699. Syntax: 
  700.  
  701.   ACCELTABLE acceltable-id [mem-option] [code-page]
  702.   BEGIN
  703.   key-value, command[, accelerator-options]...
  704.       .
  705.       .
  706.       .
  707.   END
  708.  
  709. Description 
  710.  
  711. The ACCELTABLE statement creates a table of accelerators for an application. 
  712. An accelerator is a keystroke that gives the user a quick way to choose a 
  713. command from a menu or carry out some other task.  An accelerator table can be 
  714. loaded when needed from the executable file by using the WinLoadAccelTable 
  715. function. 
  716.  
  717. You can provide any number of ACCELTABLE statements in a resource script file. 
  718. Each statement must specify a unique table identifier.  You can provide any 
  719. number of accelerator definitions in an accelerator table; however, no two 
  720. definitions in a table can specify the same key. 
  721.  
  722. Each accelerator definition must specify a key value and command. The 
  723. WinSetAccelTable function used in the application translates the accelerator 
  724. keystroke into a WM_COMMAND, WM_HELP, or WM_SYSCOMMAND message that has the 
  725. corresponding command value.  The message type depends on the 
  726. accelerator-option field. 
  727.  
  728.  acceltable-id     Specifies the accelerator-table identifier. This value must 
  729.                    be an unsigned integer in the range of 1 through 65535, a 
  730.                    simple expression that evaluates to a value in these ranges, 
  731.                    or a character string. Each accelerator table in a resource 
  732.                    script file must have a unique identifier. 
  733.  mem-option        Specifies how the system manages the resource when it is in 
  734.                    memory.  This value must be one of the following: 
  735.                    Option              Meaning 
  736.                    FIXED               System keeps the resource at a fixed 
  737.                                        memory location. 
  738.                    MOVEABLE            System moves the resource as necessary 
  739.                                        to compact memory.  This is the default 
  740.                                        option. 
  741.                    DISCARDABLE         System discards the resource if it is no 
  742.                                        longer needed. 
  743.  code-page         Specifies a code page value. For a list of valid code pages 
  744.                    see CODEPAGE Statement. 
  745.  key-value         Specifies the character, scan, or virtual-key code of the 
  746.                    accelerator key.  The meaning depends on the 
  747.                    accelerator-options field.  The key-value field must be a 
  748.                    single character enclosed in double-quotation marks or an 
  749.                    integer in the range 0 through 255. If you specify an 
  750.                    integer, you must specify the CHAR, SCANCODE, or VIRTUALKEY 
  751.                    accelerator option; otherwise, the default option is CHAR. 
  752.                    Integers must be in decimal or hexadecimal notation. 
  753.  command           Specifies the command value for the corresponding 
  754.                    WM_COMMAND, WM_HELP, or WM_SYSCOMMAND message.  This value 
  755.                    must be a signed integer in the range -32768 through 32767, 
  756.                    or a simple expression that evaluates to an integer in that 
  757.                    range. 
  758.  accelerator-options Specifies the accelerator type.  This value can be a 
  759.                    combination of the following: 
  760.                    VIRTUALKEY           Specifies that the key-value field is a 
  761.                                         virtual-key code. 
  762.                    SCANCODE             Specifies that the key-value field is a 
  763.                                         keyboard scan code. 
  764.                    CHAR                 Specifies that the key-value field is a 
  765.                                         character code. 
  766.                    SHIFT                Specifies that the user must press the 
  767.                                         Shift key and the key corresponding to 
  768.                                         the key-value field to generate the 
  769.                                         accelerator. 
  770.                    CONTROL              Specifies that the user must press the 
  771.                                         Ctrl key and the key corresponding to 
  772.                                         the key-value field to generate the 
  773.                                         accelerator. 
  774.                    ALT                  Specifies that the user must press the 
  775.                                         Alt key and the key corresponding to 
  776.                                         the key-value field to generate the 
  777.                                         accelerator. 
  778.                    LONEKEY              Specifies that the user needs to press 
  779.                                         only the key corresponding to the 
  780.                                         key-value field to generate the 
  781.                                         accelerator. 
  782.                    SYSCOMMAND           Specifies that the accelerator 
  783.                                         translates to a WM_SYSCOMMAND message. 
  784.                                         If you do not include this option, the 
  785.                                         accelerator translates to a WM_COMMAND 
  786.                                         message. 
  787.                    HELP                 Specifies that the accelerator 
  788.                                         translates to a WM_HELP message.  If 
  789.                                         you do not include this option, the 
  790.                                         accelerator translates to a WM_COMMAND 
  791.                                         message. 
  792.  
  793.  Note:  VIRTUALKEY, SCANCODE, and CHAR are mutually exclusive. SYSCOMMAND and 
  794.  HELP are also mutually exclusive. 
  795.  
  796.  Comments 
  797.  
  798.  If two accelerators use the same key with different Shift, Control, or ALT 
  799.  options, you should specify the more restrictive accelerator first in the 
  800.  table.  For example, you should place Shift+Enter before Enter. 
  801.  
  802.  If you include the OS2.H header file, you can use the following constants to 
  803.  specify the accelerator options: 
  804.  
  805.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  806.   ΓöéAF_ALT              ΓöéAF_CHAR             ΓöéAF_CONTROL          Γöé
  807.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  808.   ΓöéAF_HELP             ΓöéAF_LONEKEY          ΓöéAF_SCANCODE         Γöé
  809.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  810.   ΓöéAF_SHIFT            ΓöéAF_SYSCOMMAND       ΓöéAF_VIRTUALKEY       Γöé
  811.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  812.  
  813.  To combine these constants, you must use the bitwise OR (|) operator. 
  814.  
  815.  Example 
  816.  
  817.  This example creates an accelerator table whose accelerator-table identifier 
  818.  is 1.  The table contains two accelerators:  Ctrl+S and Ctrl+G.  These 
  819.  accelerators generate WM_COMMAND messages with values of 101 and 102, 
  820.  respectively, when the user presses the corresponding keys. 
  821.  
  822.     ACCELTABLE 1
  823.     BEGIN
  824.         "S", 101, CONTROL
  825.         "G", 102, CONTROL
  826.     END
  827.  
  828.  
  829. ΓòÉΓòÉΓòÉ 2.5.2. ASSOCTABLE Statement ΓòÉΓòÉΓòÉ
  830.  
  831. Syntax: 
  832.  
  833.   ASSOCTABLE assoctable-id [load-option][mem-option] [code-page]
  834.   BEGIN
  835.   association-name, file-match-string[, extended-attribute-flag]
  836.      [, icon-filename]
  837.     .
  838.     .
  839.     .
  840.   END
  841.  
  842. Description 
  843.  
  844. The ASSOCTABLE statement defines a file-association table for an application. 
  845. This table associates the data files that an application creates with the 
  846. executable file of the application.  When the user selects one of these data 
  847. files from File Manager, the associated application begins executing. 
  848.  
  849. A file-association table can also associate icons with the data files that an 
  850. application creates.  The shell uses these icons to identify the data files 
  851. graphically.  Because a file-association table associates icons by file type, 
  852. all data files having the same file type have the same icon. 
  853.  
  854. You can provide any number of ASSOCTABLE statements in a resource script file, 
  855. but each statement must specify a unique assoctable-id value.  The 
  856. file-association tables are written not only to the resources within your 
  857. executable file, but also to the .ASSOC extended attribute.  However, only the 
  858. last file-association table specified in the resource script file is actually 
  859. written to the extended attribute. 
  860.  
  861.  assoctable-id     Specifies the association-table identifier. This value must 
  862.                    be an unsigned integer in the range of 1 through 65535, or a 
  863.                    simple expression that evaluates to a value in these ranges. 
  864.                    Character strings cannot be used as resource identifiers for 
  865.                    this statement. 
  866.  load-option       Specifies when the system loads the resource from the 
  867.                    executable file into memory.  This value must be one of the 
  868.                    following: 
  869.                    PRELOAD             System loads the resource when the 
  870.                                        application starts. 
  871.                    LOADONCALL          System loads the resource when the 
  872.                                        application calls the DosGetResource or 
  873.                                        DosGetResource2 function.  This is the 
  874.                                        default option. 
  875.  mem-option        Specifies how the system manages the resource when it is in 
  876.                    memory.  This value must be one of the following: 
  877.                    FIXED               System keeps the resource at a fixed 
  878.                                        memory location. 
  879.                    MOVEABLE            System moves the resource as necessary 
  880.                                        to compact memory.  This is the default 
  881.                                        option. 
  882.                    DISCARDABLE         System discards the resource if it is no 
  883.                                        longer needed. 
  884.  code-page         Specifies a code page value.  For a list of valid code pages 
  885.                    see CODEPAGE Statement. 
  886.  association-name  Specifies the name of the file type the application 
  887.                    recognizes.  This field must contain zero or more characters 
  888.                    enclosed in double quotation marks. 
  889.  
  890.                    Character values must be in the range 1 through 255.  If a 
  891.                    double quotation mark is required in the name, you must 
  892.                    include the double quotation mark twice. 
  893.  file-match-string Specifies the file-matching string of a particular type of 
  894.                    data file that the application creates. This field must 
  895.                    contain zero or more characters enclosed in double quotation 
  896.                    marks. You can only use characters that are valid in OS/2 
  897.                    file names and extensions and the OS/2 wildcard characters 
  898.                    question mark (?) and asterisk (*). 
  899.  extended-attribute-flag Specifies the extended-attribute options. This value 
  900.                    can be a combination of the following: 
  901.                    EAF_DEFAULTOWNER           Specifies that the application 
  902.                                               containing the file-association 
  903.                                               table starts when the user 
  904.                                               selects any file matching the 
  905.                                               file-match-string field from File 
  906.                                               Manager. 
  907.                    EAF_REUSEICON              Specifies that the icon defined 
  908.                                               in the previous entry of the 
  909.                                               file-association table is used as 
  910.                                               the icon for the current 
  911.                                               data-file type. 
  912.                    EAF_UNCHANGEABLE           Specifies that the entry should 
  913.                                               not be edited. 
  914.  icon-filename     Specifies the name of the file containing an icon. File 
  915.                    Manager uses this icon to represent all application-created 
  916.                    data files matching the file-match-string field.  The file 
  917.                    must be in the current directory. 
  918.  
  919.  
  920. ΓòÉΓòÉΓòÉ 2.5.3. AUTOCHECKBOX Statement ΓòÉΓòÉΓòÉ
  921.  
  922. Syntax: 
  923.  
  924.   AUTOCHECKBOX text, id, x, y, width, height[, style]
  925.  
  926. The AUTOCHECKBOX statement creates an automatic-check-box control. The control 
  927. is a small rectangle (check box) that contains an X when the user selects it. 
  928. The specified text is displayed to the right of the check box.  An X appears in 
  929. the square when the user first selects the control and disappears the next time 
  930. the user selects it.  The AUTOCHECKBOX statement, which you can use only in a 
  931. DIALOG or WINDOW statement, defines the text, identifier, dimensions, and 
  932. attributes of a control window.  The predefined class for this control is 
  933. WC_BUTTON. If you do not specify the style, the default style is 
  934. BS_AUTOCHECKBOX and WS_TABSTOP. 
  935.  
  936.  text    Specifies text that is displayed to the right of the control.  This 
  937.          field must contain zero or more characters enclosed in double 
  938.          quotation marks.  Character values must be in the range 1 through 255. 
  939.          If a double quotation mark is required in the text, you must include 
  940.          the double quotation mark twice.  A tilde ( ~ ) character in the text 
  941.          indicates that the following character is used as a mnemonic character 
  942.          for the control.  When the control is displayed, the tilde is not 
  943.          shown, but the mnemonic character is underlined.  The user can choose 
  944.          the control by pressing the key corresponding to the underlined 
  945.          mnemonic character. 
  946.  id      Specifies the control identifier. This value must be a signed integer 
  947.          in the range -32768 through 32767, an unsigned integer in the range of 
  948.          1 through 65535, or a simple expression that evaluates to a value in 
  949.          these ranges. 
  950.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  951.          This value must be a signed integer in the range -32768 through 32767 
  952.          or an expression consisting of integers and the addition (+) or 
  953.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  954.          units and is relative to the origin of the dialog box, window, or 
  955.          control containing the specified control. 
  956.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  957.          This value must be a signed integer in the range -32768 through 32767 
  958.          or an expression consisting of integers and the addition (+) or 
  959.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  960.          units and is relative to the origin of the dialog box, window, or 
  961.          control containing the specified control. 
  962.  width   Specifies the width of the control.  This value must be an integer in 
  963.          the range 0 through 65535 or an expression consisting of integers and 
  964.          the addition (+) or subtraction (-) operator.  The width is in 
  965.          n-character units. 
  966.  height  Specifies the height of the control.  This value must be an integer in 
  967.          the range 0 through 65535 or an expression consisting of integers and 
  968.          the addition (+) or subtraction (-) operator.  The height is in 
  969.          1/8-character units. 
  970.  style   Specifies the control styles.  This value can be a combination of the 
  971.          styles specified for WC_BUTTON. You can use the bitwise OR (|) 
  972.          operator to combine styles. 
  973.  
  974.  Example 
  975.  
  976.  This example creates an automatic-check-box control that is labeled "Italic." 
  977.  
  978.     AUTOCHECKBOX "Italic", 101, 10, 10, 100, 100
  979.  
  980.  
  981. ΓòÉΓòÉΓòÉ 2.5.4. AUTORADIOBUTTON Statement ΓòÉΓòÉΓòÉ
  982.  
  983. Syntax: 
  984.  
  985.   AUTORADIOBUTTON text, id, x, y, width, height[, style]
  986.  
  987. The AUTORADIOBUTTON statement creates an automatic-radio-button control.  This 
  988. control is a small circle with the given text displayed to its right.  The 
  989. control highlights the circle and sends a message to its parent window when the 
  990. user selects the button.  The control also removes the selection from any other 
  991. automatic-radio-button controls in the same group.  When the user selects the 
  992. button again, the control removes the highlight before sending a message.  The 
  993. AUTORADIOBUTTON statement, which you can use only in a DIALOG or WINDOW 
  994. statement, defines the text, identifier, dimensions, and attributes of a 
  995. control window.  The predefined class for this control is WC_BUTTON.  If you do 
  996. not specify a style, the default style is BS_AUTORADIOBUTTON. 
  997.  
  998.  text    Specifies text that is displayed to the right of the control.  This 
  999.          field must contain zero or more characters enclosed in double 
  1000.          quotation marks.  Character values must be in the range 1 through 255. 
  1001.          If a double quotation mark is required in the text, you must include 
  1002.          the double quotation mark twice.  A tilde ( ~ ) character in the text 
  1003.          indicates that the following character is used as a mnemonic character 
  1004.          for the control.  When the control is displayed, the tilde is not 
  1005.          shown, but the mnemonic character is underlined. The user can choose 
  1006.          the control by pressing the key corresponding to the underlined 
  1007.          mnemonic character. 
  1008.  id      Specifies the control identifier. This value must be a signed integer 
  1009.          in the range -32768 through 32767, an unsigned integer in the range of 
  1010.          1 through 65535, or a simple expression that evaluates to a value in 
  1011.          these ranges. 
  1012.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  1013.          This value must be a signed integer in the range -32768 through 32767 
  1014.          or an expression consisting of integers and the addition (+) or 
  1015.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  1016.          units and is relative to the origin of the dialog box, window, or 
  1017.          control containing the specified control. 
  1018.  y       This value must be a signed integer in the range -32768 through 32767 
  1019.          or an expression consisting of integers and the addition (+) or 
  1020.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  1021.          units and is relative to the origin of the dialog box, window, or 
  1022.          control containing the specified control. 
  1023.  width   Specifies the width of the control.  This value must be an integer in 
  1024.          the range 0 through 65535 or an expression consisting of integers and 
  1025.          the addition (+) or subtraction (-) operator.  The width is in 
  1026.          n-character units. 
  1027.  height  Specifies the height of the control.  This value must be an integer in 
  1028.          the range 0 through 65535 or an expression consisting of integers and 
  1029.          the addition (+) or subtraction (-) operator.  The height is in 
  1030.          1/8-character units. 
  1031.  style   Specifies the control styles.  This value can be a combination of the 
  1032.          styles specified for WC_BUTTON. You can use the bitwise OR (|) 
  1033.          operator to combine styles. 
  1034.  
  1035.  Example 
  1036.  
  1037.  This example creates an automatic-radio-button control that is labeled 
  1038.  "Italic." 
  1039.  
  1040.     AUTORADIOBUTTON "Italic", 101, 10, 10, 24, 50
  1041.  
  1042.  
  1043. ΓòÉΓòÉΓòÉ 2.5.5. BITMAP Statement ΓòÉΓòÉΓòÉ
  1044.  
  1045. Syntax: 
  1046.  
  1047.   BITMAP bitmap-id [load-option] [mem-option] [codepage] filename
  1048.  
  1049. The BITMAP statement defines a bit map resource for an application.  A bit map 
  1050. resource, typically created using the Icon Editor, is a custom bit map that an 
  1051. application uses in its display or as an item in a menu.  The BITMAP statement 
  1052. copies the bit-map resource from the file specified in the filename field and 
  1053. adds it to the application's other resources.  A bit-map resource can be loaded 
  1054. from the executable file when needed by using the GpiLoadBitmap function. 
  1055.  
  1056. You can provide any number of BITMAP statements in a resource script file, but 
  1057. each statement must specify a unique bitmap-id value. 
  1058.  
  1059.  bitmap-id         Specifies the bit-map-resource identifier. This value must 
  1060.                    be an unsigned integer in the range of 1 through 65535, a 
  1061.                    simple expression that evaluates to a value in these ranges, 
  1062.                    or a character string. 
  1063.  load-option       Specifies when the system loads the resource from the 
  1064.                    executable file into memory.  This value must be one of the 
  1065.                    following: 
  1066.                    PRELOAD             System loads the resource when the 
  1067.                                        application starts. 
  1068.                    LOADONCALL          System loads the resource when the 
  1069.                                        application calls the GpiLoadBitmap 
  1070.                                        function.  This is the default option. 
  1071.  mem-option        Specifies how the system manages the resource when it is in 
  1072.                    memory.  This value must be one of the following: 
  1073.                    FIXED               System keeps the resource at a fixed 
  1074.                                        memory location. 
  1075.                    MOVEABLE            System moves the resource as necessary 
  1076.                                        to compact memory.  This is the default 
  1077.                                        option. 
  1078.                    DISCARDABLE         System discards the resource if it is no 
  1079.                                        longer needed. 
  1080.  codepage          Specifies a code page value. For a list of valid code pages 
  1081.                    see CODEPAGE Statement. 
  1082.  filename          Specifies the name of the file containing the icon resource. 
  1083.                    If the file is not in the current directory, filename must 
  1084.                    be preceded by a full path. 
  1085.  
  1086.  Example 
  1087.  
  1088.  This example defines a bit map whose bit-map identifier is 12. The bit-map 
  1089.  resource is copied from the file CUSTOM.BMP. 
  1090.  
  1091.     BITMAP 12 custom.bmp
  1092.  
  1093.  
  1094. ΓòÉΓòÉΓòÉ 2.5.6. CHECKBOX Statement ΓòÉΓòÉΓòÉ
  1095.  
  1096. Syntax: 
  1097.  
  1098.   CHECKBOX text, id, x, y, width, height[, style]
  1099.  
  1100. The CHECKBOX statement creates a check-box control.  The control is a small 
  1101. rectangle (check box) that has the specified text displayed to the right.  The 
  1102. control highlights the rectangle and sends a message to its parent window when 
  1103. the user selects the control.  The CHECKBOX statement, which you can use only 
  1104. in a DIALOG or WINDOW statement, defines the text, identifier, dimensions, and 
  1105. attributes of a control window.  The predefined class for this control is 
  1106. WC_BUTTON.  If you do not specify a style, the default style is BS_CHECKBOX and 
  1107. WS_TABSTOP. 
  1108.  
  1109.  text    Specifies text that is displayed to the right of the control.  This 
  1110.          field must contain zero or more characters enclosed in double 
  1111.          quotation marks.  Character values must be in the range 1 through 255. 
  1112.          If a double quotation mark is required in the text, you must include 
  1113.          the double quotation mark twice.  A tilde ( ~ ) character in the text 
  1114.          indicates that the following character is used as a mnemonic character 
  1115.          for the control.  When the control is displayed, the tilde is not 
  1116.          shown, but the mnemonic character is underlined.  The user can choose 
  1117.          the control by pressing the key corresponding to the underlined 
  1118.          mnemonic character. 
  1119.  id      Specifies the control identifier. This value must be a signed integer 
  1120.          in the range -32768 through 32767, an unsigned integer in the range of 
  1121.          1 through 65535, or a simple expression that evaluates to a value in 
  1122.          these ranges. 
  1123.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  1124.          This value must be a signed integer in the range -32768 through 32767 
  1125.          or an expression consisting of integers and the addition (+) or 
  1126.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  1127.          units and is relative to the origin of the dialog box, window, or 
  1128.          control containing the specified control. 
  1129.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  1130.          This value must be a signed integer in the range -32768 through 32767 
  1131.          or an expression consisting of integers and the addition (+) or 
  1132.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  1133.          units and is relative to the origin of the dialog box, window, or 
  1134.          control containing the specified control. 
  1135.  width   Specifies the width of the control.  This value must be an integer in 
  1136.          the range 0 through 65535 or an expression consisting of integers and 
  1137.          the addition (+) or subtraction (-) operator.  The width is in 
  1138.          n-character units. 
  1139.  height  Specifies the height of the control.  This value must be an integer in 
  1140.          the range 0 through 65535 or an expression consisting of integers and 
  1141.          the addition (+) or subtraction (-) operator.  The height is in 
  1142.          1/8-character units. 
  1143.  style   Specifies the control styles.  This value can be a combination of the 
  1144.          styles specified for WC_BUTTON. You can use the bitwise OR (|) 
  1145.          operator to combine styles. 
  1146.  
  1147.  Example 
  1148.  
  1149.  This example creates a check-box control that is labeled "Italic." 
  1150.  
  1151.     CHECKBOX "Italic", 101, 10, 10, 100, 100
  1152.  
  1153.  
  1154. ΓòÉΓòÉΓòÉ 2.5.7. CODEPAGE Statement ΓòÉΓòÉΓòÉ
  1155.  
  1156. Syntax: 
  1157.  
  1158.   CODEPAGE codepage-id
  1159.  
  1160. The CODEPAGE statement sets the code page for all subsequent resources.  The 
  1161. code page specifies the character set used for characters in the resource. 
  1162.  
  1163. If the CODEPAGE statement is not given in a resource script file, RC uses the 
  1164. code page set up for the individual system.  If more than one CODEPAGE 
  1165. statement is given in the file, each CODEPAGE statement applies to the resource 
  1166. statements between it and the next CODEPAGE statement. 
  1167.  
  1168.  codepage-id       Identifies the code page to be used for subsequent 
  1169.                    resources. For a complete list of supported code pages, 
  1170.                    refer to the "COUNTRYCODE" section of the Control Program 
  1171.                    Programming Guide and Reference. 
  1172.  
  1173.  Comments 
  1174.  
  1175.  You may also specify a code page by placing a code-page identifier in the 
  1176.  load-options or memory-options field of any RC statement that uses those 
  1177.  fields. 
  1178.  
  1179.  Example 
  1180.  
  1181.  In this example, the code page for the character-string resources is set to 
  1182.  Portuguese (860). 
  1183.  
  1184.     CODEPAGE 860
  1185.  
  1186.     STRINGTABLE
  1187.     BEGIN
  1188.         1 "Filename not found"
  1189.         2 "Cannot open file for reading"
  1190.     END
  1191.  
  1192.  
  1193. ΓòÉΓòÉΓòÉ 2.5.8. COMBOBOX Statement ΓòÉΓòÉΓòÉ
  1194.  
  1195. Syntax: 
  1196.  
  1197.   COMBOBOX text, id, x, y, width, height[, style]
  1198.  
  1199. The COMBOBOX statement creates a combination-box control.  This control 
  1200. combines a list-box control with an entry-field control.  It allows the user to 
  1201. place the selected item from a list box into an entry field. 
  1202.  
  1203. The COMBOBOX statement, which you can use only in a DIALOG or WINDOW statement, 
  1204. defines the text, identifier, dimensions, and attributes of a control window. 
  1205. The predefined class for this control is WC_COMBOBOX. If you do not specify a 
  1206. style, the default style is CBS_SIMPLE, WS_GROUP, WS_TABSTOP, and WS_VISIBLE. 
  1207.  
  1208.  text    Specifies text that is displayed in the entry field of the control. 
  1209.          This field must contain zero or more characters enclosed in double 
  1210.          quotation marks.  Character values must be in the range 1 through 255. 
  1211.          If a double quotation mark is required in the text, you must include 
  1212.          the double quotation mark twice. 
  1213.  id      Specifies the control identifier. This value must be a signed integer 
  1214.          in the range -32768 through 32767, an unsigned integer in the range of 
  1215.          1 through 65535, or a simple expression that evaluates to a value in 
  1216.          these ranges. 
  1217.  x       Specifies the x-coordinate of the lower-left corner of the control 
  1218.          This value must be a signed integer in the range -32768 through 32767 
  1219.          or an expression consisting of integers and the addition (+) or 
  1220.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  1221.          units and is relative to the origin of the dialog box, window, or 
  1222.          control containing the specified control. 
  1223.  y       Specifies the y-coordinate of the lower-left corner of the control 
  1224.          This value must be a signed integer in the range -32768 through 32767 
  1225.          or an expression consisting of integers and the addition (+) or 
  1226.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  1227.          units and is relative to the origin of the dialog box, window, or 
  1228.          control containing the specified control. 
  1229.  width   Specifies the width of the control.  This value must be an integer in 
  1230.          the range 0 through 65535 or an expression consisting of integers and 
  1231.          the addition (+) or subtraction (-) operator.  The width is in 
  1232.          n-character units. 
  1233.  height  Specifies the height of the control.  This value must be an integer in 
  1234.          the range 0 through 65535 or an expression consisting of integers and 
  1235.          the addition (+) or subtraction (-) operator.  The height is in 
  1236.          1/8-character units. 
  1237.  style   Specifies the control styles.  This value can be a combination of the 
  1238.          styles specified for WC_COMBOBOX. You can use the bitwise OR (|) 
  1239.          operator to combine styles. 
  1240.  
  1241.  Example 
  1242.  
  1243.  This example creates a combination-box control. 
  1244.  
  1245.     COMBOBOX "", 101, 10, 10, 24, 50
  1246.  
  1247.  
  1248. ΓòÉΓòÉΓòÉ 2.5.9. CONTAINER Statement ΓòÉΓòÉΓòÉ
  1249.  
  1250. Syntax: 
  1251.  
  1252.   CONTAINER  id, x, y, width, height [,style]
  1253.  
  1254. The CONTAINER statement creates a container control within a dialog window. 
  1255. The container control is a visual component that holds objects.  The CONTAINER 
  1256. statement defines the identifier, position, dimensions, and attributes of a 
  1257. container control. The predefined class for this control is WC_CONTAINER.  If 
  1258. you do not specify a style, the default style is WS_TABSTOP, WS_VISIBLE, and 
  1259. CCS_SINGLESEL. 
  1260.  
  1261.  id      Specifies the control identifier. This value is a signed integer 
  1262.          -32768 through 32767, an unsigned integer in the range of 1 through 
  1263.          65535, or a simple expression that evaluates to a value in these 
  1264.          ranges. 
  1265.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  1266.          This value is a signed integer -32768 through 32767 or an expression 
  1267.          consisting of integers and the addition (+) or subtraction (-) 
  1268.          operator.  The coordinate is assumed to be in dialog units and is 
  1269.          relative to the origin of the dialog window containing the container 
  1270.          control. 
  1271.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  1272.          This value is a signed integer -32768 through 32767 or an expression 
  1273.          consisting of integers and the addition (+) or subtraction (-) 
  1274.          operator.  The coordinate is assumed to be in dialog units and is 
  1275.          relative to the origin of the dialog window containing the container 
  1276.          control. 
  1277.  width   Specifies the width of the control.  This value is any integer 0 
  1278.          through 65535, or an expression consisting of integers and the 
  1279.          addition (+) or subtraction (-) operator. The width is in n-character 
  1280.          units. 
  1281.  height  Specifies the height of the control.  This value is any integer 0 
  1282.          through 65535, or an expression consisting of integers and the 
  1283.          addition (+) or subtraction (-) operator. The height is in 
  1284.          1/8-character units. 
  1285.  style   Specifies the control styles.  This value can be a combination of the 
  1286.          styles specified for WC_CONTAINER. Use the bitwise OR (|) operator to 
  1287.          combine styles. 
  1288.  
  1289.  Comments 
  1290.  
  1291.  A CONTAINER statement is only used in a DIALOG or WINDOW statement. 
  1292.  
  1293.  Example 
  1294.  
  1295.  This example creates a container control at position (30,30) within the dialog 
  1296.  window.  The container has a width of 70 character units and a height of 25 
  1297.  character units.  Its resource identifier is 301.  The default style 
  1298.  CCS_SINGLESEL has been overridden by the style specification CCS_MULTIPLESEL. 
  1299.  The default styles WS_TABSTOP and WS_GROUP are both in effect, though only the 
  1300.  latter is specified. 
  1301.  
  1302.   #define IDC_CONTAINER    301
  1303.   #define IDD_CONTAINERDLG 504
  1304.   DIALOG "Container", IDD_CONTAINERDLG, 23, 6, 120, 280, FS_NOBYTEALIGN |
  1305.           WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
  1306.     BEGIN
  1307.        CONTAINER   IDC_CONTAINER, 30, 30, 70, 200, CCS_MULTIPLESEL |
  1308.                          WS_GROUP
  1309.     END
  1310.  
  1311.  
  1312. ΓòÉΓòÉΓòÉ 2.5.10. CONTROL Statement ΓòÉΓòÉΓòÉ
  1313.  
  1314. Syntax: 
  1315.  
  1316.   CONTROL text, id, x, y, width, height, class[, style]
  1317.           [data-definitions]
  1318.   [ BEGIN
  1319.   control-definition
  1320.       .
  1321.       .
  1322.       .
  1323.   END ]
  1324.  
  1325. The CONTROL statement defines a control as belonging to the specified class. 
  1326. The statement defines the position and dimensions of the control within the 
  1327. parent window, as well as the control style.  The CONTROL statement is most 
  1328. often used in a DIALOG or WINDOW statement. 
  1329.  
  1330. Typically, several CONTROL statements are used in each DIALOG statement, and 
  1331. each CONTROL statement must have a unique identifier value. The optional BEGIN 
  1332. and END statements enclose any CONTROL statements that may be given with the 
  1333. control.  CONTROL statements given in this manner represent child windows 
  1334. belonging to the control created by the CONTROL statement. 
  1335.  
  1336.  text    Specifies text that is displayed to the right of the control.  This 
  1337.          field must contain zero or more characters enclosed in double 
  1338.          quotation marks.  Character values must be in the range 1 through 255. 
  1339.          If a double quotation mark is required in the text, you must include 
  1340.          the double quotation mark twice.  In the appropriate styles, a tilde ( 
  1341.          ~ ) character in the text indicates that the following character is 
  1342.          used as a mnemonic character for the control.  When the control is 
  1343.          displayed, the tilde is not shown, but the mnemonic character is 
  1344.          underlined.  The user can choose the control by pressing the key 
  1345.          corresponding to the underlined mnemonic character. 
  1346.  id      Specifies the control identifier. This value must be a signed integer 
  1347.          in the range -32768 through 32767, an unsigned integer in the range of 
  1348.          1 through 65535, or a simple expression that evaluates to a value in 
  1349.          these ranges. 
  1350.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  1351.          This value must be a signed integer in the range -32768 through 32767 
  1352.          or an expression consisting of integers and the addition (+) or 
  1353.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  1354.          units and is relative to the origin of the parent window. 
  1355.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  1356.          This value must be a signed integer in the range -32768 through 32767 
  1357.          or an expression consisting of integers and the addition (+) or 
  1358.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  1359.          units and is relative to the origin of the parent window. 
  1360.  width   Specifies the width of the control.  This value must be an integer in 
  1361.          the range 0 through 65535 or an expression consisting of integers and 
  1362.          the addition (+) or subtraction (-) operator.  The value is in 
  1363.          n-character units. 
  1364.  height  Specifies the height of the control.  This value must be an integer in 
  1365.          the range 0 through 65535 or an expression consisting of integers and 
  1366.          the addition (+) or subtraction (-) operator.  The value is in 
  1367.          1/8-character units. 
  1368.  class   Specifies the control class.  This value can be one of the control 
  1369.          classes specified in the "Control Classes" table, in the Presentation 
  1370.          Manager Programming Reference, or the name of the control class, 
  1371.          enclosed in double quotation marks. 
  1372.  style   Specifies the control style.  This value can be a combination of 
  1373.          control styles. You can use the bitwise OR (|) operator to combine 
  1374.          styles. 
  1375.  data-definitions Specifies a CTLDATA and/or PRESPARAMS statement. These 
  1376.          statements define control and presentation data for the control. For 
  1377.          more information, see CTLDATA Statement and PRESPARAMS Statement. 
  1378.  control-definition Specifies a CONTROL statement or any one of several 
  1379.          predefined control statements. These statements define the style, 
  1380.          position, and dimensions of controls in the control. 
  1381.  
  1382.  Comments 
  1383.  
  1384.  The CONTROL statement can actually contain any combination of CONTROL, DIALOG, 
  1385.  and WINDOW statements.  But typically, a CONTROL statement contains no such 
  1386.  statements. 
  1387.  
  1388.  Example 
  1389.  
  1390.  This example creates a pushbutton control with the WS_TABSTOP and WS_VISIBLE 
  1391.  styles. 
  1392.  
  1393.     CONTROL "OK", 101, 10, 10, 20, 50, WC_BUTTON, BS_PUSHBUTTON |
  1394.                                                   WS_TABSTOP    |
  1395.                                                   WS_VISIBLE
  1396.  
  1397.  
  1398. ΓòÉΓòÉΓòÉ 2.5.11. CTEXT Statement ΓòÉΓòÉΓòÉ
  1399.  
  1400. Syntax: 
  1401.  
  1402.   CTEXT text, id, x, y, width, height[, style]
  1403.  
  1404. The CTEXT statement creates a centered-text control.  The control is a simple 
  1405. rectangle displaying the given text centered in the rectangle.  The text is 
  1406. formatted before it is displayed.  Words that would extend past the end of a 
  1407. line are automatically wrapped to the beginning of the next line.  The CTEXT 
  1408. statement, which you can use only in a DIALOG or WINDOW statement, defines the 
  1409. text, identifier, dimensions, and attributes of the control.  The predefined 
  1410. class for this control is WC_STATIC.  If you do not specify a style, the 
  1411. default style is SS_TEXT, DT_CENTER, and WS_GROUP. 
  1412.  
  1413.  text    Specifies text that is centered in the rectangular area of the 
  1414.          control.  This field must contain zero or more characters enclosed in 
  1415.          double quotation marks.  Character values must be in the range 1 
  1416.          through 255.  If a double quotation mark is required in the text, you 
  1417.          must include the double quotation mark twice. 
  1418.  id      Specifies the control identifier. This value must be a signed integer 
  1419.          in the range -32768 through 32767, an unsigned integer in the range of 
  1420.          1 through 65535, or a simple expression that evaluates to a value in 
  1421.          these ranges. 
  1422.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  1423.          This value must be a signed integer in the range -32768 through 32767 
  1424.          or an expression consisting of integers and the addition (+) or 
  1425.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  1426.          units and is relative to the origin of the dialog box, window, or 
  1427.          control containing the specified control. 
  1428.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  1429.          This value must be a signed integer in the range -32768 through 32767 
  1430.          or an expression consisting of integers and the addition (+) or 
  1431.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  1432.          units and is relative to the origin of the dialog box, window, or 
  1433.          control containing the specified control. 
  1434.  width   Specifies the width of the control.  This value must be an integer in 
  1435.          the range 0 through 65535 or an expression consisting of integers and 
  1436.          the addition (+) or subtraction (-) operator.  The width is in 
  1437.          n-character units. 
  1438.  height  Specifies the height of the control.  This value must be an integer in 
  1439.          the range 0 through 65535 or an expression consisting of integers and 
  1440.          the addition (+) or subtraction (-) operator.  The height is in 
  1441.          1/8-character units. 
  1442.  style   Specifies the control styles.  This value can be a combination of the 
  1443.          styles specified for WC_STATIC. You can use the bitwise OR (|) 
  1444.          operator to combine styles. 
  1445.  
  1446.  Example 
  1447.  
  1448.  This example creates a centered-text control that is labeled "Filename." 
  1449.  
  1450.     CTEXT "Filename", 101, 10, 10, 100, 100
  1451.  
  1452.  
  1453. ΓòÉΓòÉΓòÉ 2.5.12. CTLDATA Statement ΓòÉΓòÉΓòÉ
  1454.  
  1455. Syntax: 
  1456.  
  1457.   CTLDATA word-value[, word-value][...]
  1458.  
  1459.   CTLDATA string
  1460.  
  1461.   CTLDATA MENU
  1462.   BEGIN
  1463.   menuitem-definition
  1464.      .
  1465.      .
  1466.      .
  1467.   END
  1468.  
  1469. The CTLDATA statement defines control data for a custom dialog box, window, or 
  1470. control.  The statement has three basic forms to permit specifying a menu or 
  1471. specifying data in words or characters.  The data can be in any format, since 
  1472. only your window procedure will use it. The window procedure of the dialog box, 
  1473. window, or control receives this data when the item is created.  It is up to 
  1474. the window procedure to process the data. 
  1475.  
  1476.  word-value     Specifies a 16-bit value. This value must be a signed integer 
  1477.                 in the range -32768 through 32767 or an expression that 
  1478.                 evaluates in that range. 
  1479.  string         Specifies a string of 8-bit characters.  This field must 
  1480.                 contain zero or more characters enclosed in double quotation 
  1481.                 marks.  Character values must be in the range 1 through 255. 
  1482.                 If a double quotation mark is required in the string, you must 
  1483.                 include the double quotation mark twice. 
  1484.  menuitem-definition Specifies a MENUITEM or SUBMENU statement.  These 
  1485.                 statements define the individual commands or submenus in the 
  1486.                 given menu. For details about these statements, see MENUITEM 
  1487.                 Statement and SUBMENU Statement. 
  1488.  
  1489.  Comments 
  1490.  
  1491.  CTLDATA is often used to supply data that controls the subsequent operation of 
  1492.  the custom window.  For example, the CTLDATA statement may contain extended 
  1493.  style bits - that is, style bits designed specifically for your customized 
  1494.  window. 
  1495.  
  1496.  You should reserve the CTLDATA statement for window classes that you create 
  1497.  yourself. 
  1498.  
  1499.  Example 
  1500.  
  1501.  This example creates a menu for the window created with the WINDOW statement. 
  1502.  
  1503.     WINDOWTEMPLATE 1
  1504.     BEGIN
  1505.         WINDOW "Sample", 1, 0, 0, 100, 100, "MYCLASS", 0, FCF_STANDARD
  1506.         CTLDATA MENU
  1507.         BEGIN
  1508.             MENUITEM "Exit", 101
  1509.         END
  1510.     END
  1511.  
  1512.  
  1513. ΓòÉΓòÉΓòÉ 2.5.13. DEFAULTICON Statement ΓòÉΓòÉΓòÉ
  1514.  
  1515. Syntax: 
  1516.  
  1517.   DEFAULTICON filename.ico
  1518.  
  1519. This statement installs the named icon file definition under the ICON Extended 
  1520. Attribute of the program file.  An icon with an icon-id of 1 is the default 
  1521. unless you supply a different icon. 
  1522.  
  1523. Example 
  1524.  
  1525.   DEFAULTICON myicon.ico
  1526.  
  1527.  
  1528. ΓòÉΓòÉΓòÉ 2.5.14. define Directive ΓòÉΓòÉΓòÉ
  1529.  
  1530. Syntax: 
  1531.  
  1532.   define name value
  1533.  
  1534. The define directive assigns the given value to the specified name. All 
  1535. subsequent occurrences of the name are replaced by the value. 
  1536.  
  1537.  name    Specifies the name to be defined. This name can be any combination of 
  1538.          letters, digits, or underscore characters which does not begin with a 
  1539.          digit. 
  1540.  value   Specifies any integer, character string, or line of text. This value 
  1541.          can contain another defined name, which creates a level of nested 
  1542.          defines.  You are limited to 64 levels of nested defines. 
  1543.  
  1544.  Example 
  1545.  
  1546.  This example assigns values to the names "NONZERO" and "USERCLASS". 
  1547.  
  1548.     #define     NONZERO     1
  1549.     #define     USERCLASS   "MyControlClass"
  1550.  
  1551.  
  1552. ΓòÉΓòÉΓòÉ 2.5.15. DEFPUSHBUTTON Statement ΓòÉΓòÉΓòÉ
  1553.  
  1554. Syntax: 
  1555.  
  1556.   DEFPUSHBUTTON text, id, x, y, width, height[, style]
  1557.  
  1558. The DEFPUSHBUTTON statement creates a default pushbutton control. The control 
  1559. is a round-cornered rectangle containing the given text. The rectangle has a 
  1560. bold outline to represent that it is the default response for the user.  The 
  1561. control sends a message to its parent window when the user chooses the control. 
  1562. The DEFPUSHBUTTON statement, which you can use only in a DIALOG or WINDOW 
  1563. statement, defines the text, identifier, dimensions, and attributes of the 
  1564. control.  The predefined class for this control is WC_BUTTON.  If you do not 
  1565. specify a style, the default style is BS_PUSHBUTTON, BS_DEFAULT, and 
  1566. WS_TABSTOP. 
  1567.  
  1568.  text    Specifies text that is centered in the rectangular area of the 
  1569.          control.  This field must contain zero or more characters enclosed in 
  1570.          double quotation marks.  Character values must be in the range 1 
  1571.          through 255.  If a double quotation mark is required in the text, you 
  1572.          must include the double quotation mark twice.  A tilde ( ~ ) character 
  1573.          in the text indicates that the following character is used as a 
  1574.          mnemonic character for the control.  When the control is displayed, 
  1575.          the tilde is not shown, but the mnemonic character is underlined. The 
  1576.          user can choose the control by pressing the key corresponding to the 
  1577.          underlined mnemonic character. 
  1578.  id      Specifies the control identifier. This value must be a signed integer 
  1579.          in the range -32768 through 32767, an unsigned integer in the range of 
  1580.          1 through 65535, or a simple expression that evaluates to a value in 
  1581.          these ranges. 
  1582.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  1583.          This value must be a signed integer in the range -32768 through 32767 
  1584.          or an expression consisting of integers and the addition (+) or 
  1585.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  1586.          units and is relative to the origin of the dialog box, window, or 
  1587.          control containing the specified control. 
  1588.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  1589.          This value must be a signed integer in the range -32768 through 32767 
  1590.          or an expression consisting of integers and the addition (+) or 
  1591.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  1592.          units and is relative to the origin of the dialog box, window, or 
  1593.          control containing the specified control. 
  1594.  width   Specifies the width of the control.  This value must be an integer in 
  1595.          the range 0 through 65535 or an expression consisting of integers and 
  1596.          the addition (+) or subtraction (-) operator.  The width is in 
  1597.          n-character units. 
  1598.  height  Specifies the height of the control.  This value must be an integer in 
  1599.          the range 0 through 65535 or an expression consisting of integers and 
  1600.          the addition (+) or subtraction (-) operator.  The height is in 
  1601.          1/8-character units. 
  1602.  style   Specifies the control styles.  This value can be a combination of the 
  1603.          styles specified for WC_BUTTON. You can use the bitwise OR (|) 
  1604.          operator to combine styles. 
  1605.  
  1606.  Example 
  1607.  
  1608.  This example creates a default pushbutton control that is labeled "Cancel." 
  1609.  
  1610.   DEFPUSHBUTTON "Cancel", 101, 10, 10, 24, 50
  1611.  
  1612.  
  1613. ΓòÉΓòÉΓòÉ 2.5.16. DIALOG Statement ΓòÉΓòÉΓòÉ
  1614.  
  1615. Syntax: 
  1616.  
  1617.   DIALOG text, id, x, y, width, height[, style[, framectl]]
  1618.          [data-definitions]
  1619.   BEGIN
  1620.   control-definition
  1621.       .
  1622.       .
  1623.       .
  1624.   END
  1625.  
  1626. The DIALOG statement defines a window that an application can use to create 
  1627. dialog boxes.  The statement defines the position and dimensions of the dialog 
  1628. box on the screen, as well as the dialog-box style.  The DIALOG statement is 
  1629. most often used in a DLGTEMPLATE statement. 
  1630.  
  1631. Typically, you use only one DIALOG statement in each DLGTEMPLATE statement, and 
  1632. the DIALOG statement contains at least one control definition. 
  1633.  
  1634.  text        Specifies the dialog-box title if the style specifies a title bar. 
  1635.              This field must contain zero or more characters enclosed in double 
  1636.              quotation marks.  Character values must be in the range 1 through 
  1637.              255.  If a double quotation mark is required in the title, you 
  1638.              must include the double quotation mark twice. 
  1639.  id          Specifies the dialog-box identifier. This value must be a signed 
  1640.              integer in the range -32768 through 32767, an unsigned integer in 
  1641.              the range of 1 through 65535, or a simple expression that 
  1642.              evaluates to a value in these ranges. 
  1643.  x           Specifies the x-coordinate of the lower-left corner of the dialog 
  1644.              box.  This value must be a signed integer in the range -32768 
  1645.              through 32767 or an expression consisting of integers and the 
  1646.              addition (+) or subtraction (-) operator.  The value is in dialog 
  1647.              units, but its exact meaning depends on the dialog style.  See the 
  1648.              "Comments" section for details. 
  1649.  y           Specifies the y-coordinate of the lower-left corner of the dialog 
  1650.              box.  This value must be a signed integer in the range -32768 
  1651.              through 32767 or an expression consisting of integers and the 
  1652.              addition (+) or subtraction (-) operator.  The value is in dialog 
  1653.              units, but its exact meaning depends on the dialog style.  See the 
  1654.              "Comments" section for details. 
  1655.  width       Specifies the width of the dialog box.  This value must be an 
  1656.              integer in the range 0 through 65535 or an expression consisting 
  1657.              of integers and the addition (+) or subtraction (-) operator.  The 
  1658.              value is in n-character units. 
  1659.  height      Specifies the height of the dialog box.  This value must be an 
  1660.              integer in the range 0 through 65535 or an expression consisting 
  1661.              of integers and the addition (+) or subtraction (-) operator.  The 
  1662.              value is in 1/8-character units. 
  1663.  style       Specifies the dialog-box style.  This value can be any of the 
  1664.              window, dialog-box, or frame styles. You can use the bitwise OR 
  1665.              (|) operator to combine styles. 
  1666.  framectl    Specifies the styles for frame controls belonging to the dialog 
  1667.              box.  This value can be any of the frame-control styles specified 
  1668.              in the "Frame-Control Flags" table in the Presentation Manager 
  1669.              Programming Reference. You can use the bitwise OR (|) operator to 
  1670.              combine styles. 
  1671.  data-definitions Specifies a CTLDATA and/or PRESPARAMS statement. These 
  1672.              statements define control and presentation data for the dialog 
  1673.              box.  For more information, see CTLDATA Statement and PRESPARAMS 
  1674.              Statement. 
  1675.  control-definition Specifies a CONTROL statement or any one of several 
  1676.              predefined control statements.  These statements define the style, 
  1677.              position, and dimensions of controls in the dialog box. 
  1678.  
  1679.  Comments 
  1680.  
  1681.  The exact meaning of the coordinates depends on the style defined by the style 
  1682.  field.  For dialog boxes with FS_SCREENALIGN style, the coordinates are 
  1683.  relative to the origin of the display screen.  For dialog boxes with the style 
  1684.  FS_MOUSEALIGN, the coordinates are relative to the position of the mouse 
  1685.  pointer at the time the dialog box is created.  For all other dialog boxes, 
  1686.  the coordinates are relative to the origin of the parent window. 
  1687.  
  1688.  The DIALOG statement can actually contain any combination of CONTROL, DIALOG, 
  1689.  and WINDOW statements.  Typically, a DIALOG statement contains one or more 
  1690.  CONTROL statements. 
  1691.  
  1692.  Example 
  1693.  
  1694.  This example creates a dialog box that is labeled "Disk Error." 
  1695.  
  1696.   DLGTEMPLATE 1
  1697.   BEGIN
  1698.       DIALOG  "Disk Error", 100, 10, 10, 300, 110
  1699.       BEGIN
  1700.           CTEXT "Select One:", 1, 10, 80, 280, 12
  1701.           RADIOBUTTON "Retry", 2, 75, 50, 60, 12
  1702.           RADIOBUTTON "Abort", 3, 75, 30, 60, 12
  1703.           RADIOBUTTON "Ignore", 4, 75, 10, 60, 12
  1704.       END
  1705.   END
  1706.  
  1707.  
  1708. ΓòÉΓòÉΓòÉ 2.5.17. DLGINCLUDE Statement ΓòÉΓòÉΓòÉ
  1709.  
  1710. Syntax: 
  1711.  
  1712.   DLGINCLUDE id filename
  1713.  
  1714. The DLGINCLUDE statement adds the specified file to the resource file.  The 
  1715. DLGINCLUDE statement is typically used to let the application access the 
  1716. definitions file for the dialog box with the corresponding identifier.  The 
  1717. file named by filename must contain the define directives used by the dialog 
  1718. box. 
  1719.  
  1720. You can provide any number of DLGINCLUDE statements in a resource script file, 
  1721. but each must have a unique identifier. 
  1722.  
  1723.  id          Specifies the dialog-box identifier. This value must be a signed 
  1724.              integer in the range -32768 through 32767, an unsigned integer in 
  1725.              the range of 1 through 65535, a simple expression that evaluates 
  1726.              to a value in these ranges, or a character string. 
  1727.  filename    Specifies the name of the file containing the define directives. 
  1728.              If the file is not in the current directory, filename must be 
  1729.              preceded by a full path. 
  1730.  
  1731.  Example 
  1732.  
  1733.  This example includes the name of the definition file dlgdef.h. The dialog-box 
  1734.  identifier is 5. 
  1735.  
  1736.   DLGINCLUDE 5 \\INCLUDE\\DLGREF.H
  1737.  
  1738.  
  1739. ΓòÉΓòÉΓòÉ 2.5.18. DLGTEMPLATE Statement ΓòÉΓòÉΓòÉ
  1740.  
  1741. Syntax: 
  1742.  
  1743.   DLGTEMPLATE dialog-id  [load-option] [mem-option] [codepage]
  1744.   BEGIN
  1745.   dialog-definition
  1746.       .
  1747.       .
  1748.       .
  1749.   END
  1750.  
  1751. The DLGTEMPLATE statement creates a dialog-box template.  A dialog-box template 
  1752. consists of a series of statements that define the identifier, load and memory 
  1753. options, dialog-box dimensions, and controls in the dialog box.  The dialog-box 
  1754. template can be loaded from the executable file by using the WinLoadDlg 
  1755. function. 
  1756.  
  1757. You can provide any number of dialog-box templates in a resource script file, 
  1758. but each template must have a unique dialog-id value. 
  1759.  
  1760.  dialog-id         Specifies the dialog-box identifier. This value must be an 
  1761.                    unsigned integer in the range of 1 through 65535, a simple 
  1762.                    expression that evaluates to a value in these ranges, or a 
  1763.                    character string. 
  1764.  load-option       Specifies when the system loads the resource from the 
  1765.                    executable file into memory.  This value must be one of the 
  1766.                    following: 
  1767.                    PRELOAD             System loads the resource when the 
  1768.                                        application starts. 
  1769.                    LOADONCALL          System loads the resource when the 
  1770.                                        application calls the WinLoadDlg 
  1771.                                        function.  This is the default option. 
  1772.  mem-option        Specifies how the system manages the resource when it is in 
  1773.                    memory.  This value must be one or more of the following: 
  1774.                    FIXED               System keeps the resource at a fixed 
  1775.                                        memory location. 
  1776.                    MOVEABLE            System moves the resource as necessary 
  1777.                                        to compact memory. 
  1778.                    DISCARDABLE         System discards the resource if it is no 
  1779.                                        longer needed. The default setting is 
  1780.                    MOVEABLE and DISCARDABLE. 
  1781.  codepage          Specifies a code-page value.  For a list of valid code pages 
  1782.                    see CODEPAGE Statement. 
  1783.  dialog-definition Specifies a DIALOG statement. The statement defines the 
  1784.                    dimensions and style of the given dialog box. For details 
  1785.                    about the statement, see DIALOG Statement. 
  1786.  
  1787.  Comments 
  1788.  
  1789.  A DLGTEMPLATE statement can actually contain DIALOG, CONTROL, and WINDOW 
  1790.  statements.  Typically, you include only one DIALOG statement. 
  1791.  
  1792.  Example 
  1793.  
  1794.  This example uses a DLGTEMPLATE statement to create a dialog box. 
  1795.  
  1796.   DLGTEMPLATE ID_GETTIMER
  1797.   BEGIN
  1798.       DIALOG "Timer", 1, 10, 10, 100, 40
  1799.       BEGIN
  1800.           LTEXT "Time (0 - 15):", 4, 8, 24, 72, 12
  1801.           ENTRYFIELD "0", ID_TIME, 80, 28, 16, 8, ES_MARGIN
  1802.           DEFPUSHBUTTON "Enter", ID_TIMEOK, 10, 6, 36, 12
  1803.           PUSHBUTTON "Cancel", ID_TIMECANCEL, 52, 6, 40, 12
  1804.       END
  1805.   END
  1806.  
  1807.  
  1808. ΓòÉΓòÉΓòÉ 2.5.19. EDITTEXT Statement ΓòÉΓòÉΓòÉ
  1809.  
  1810. Syntax: 
  1811.  
  1812.   EDITTEXT text, id, x, y, width, height [,style]
  1813.  
  1814. The EDITTEXT statement creates an entry-field control.  This control is a 
  1815. rectangle in which the user can type and edit text. The control displays a 
  1816. pointer when the user selects the control.  The user can then use the keyboard 
  1817. to enter text or edit the existing text.  Editing keys include the BACKSPACE 
  1818. and DELETE keys.  By using the mouse or the DIRECTION keys, the user can select 
  1819. the character or characters to delete or select the place to insert new 
  1820. characters. 
  1821.  
  1822. The EDITTEXT statement defines the text, identifier, dimensions, and attributes 
  1823. of a control window.  The predefined class for this control is WC_ENTRYFIELD. 
  1824. If you do not specify a style, the default style is ES_AUTOSCROLL and 
  1825. WS_TABSTOP. 
  1826.  
  1827.  text    Specifies text that is displayed in the rectangular area of the 
  1828.          control.  This field must contain zero or more characters enclosed in 
  1829.          double quotation marks.  Character values must be in the range 1 
  1830.          through 255.  If a double quotation mark is required in the text, you 
  1831.          must include the double quotation mark twice. 
  1832.  id      Specifies the control identifier. This value is a signed integer 
  1833.          -32768 through 32767, an unsigned integer in the range of 1 through 
  1834.          65535, or a simple expression that evaluates to a value in these 
  1835.          ranges. 
  1836.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  1837.          This value is a signed integer -32768 through 32767, or an expression 
  1838.          consisting of integers and the addition (+) or subtraction (-) 
  1839.          operator.  The coordinate is assumed to be in dialog units and is 
  1840.          relative to the origin of the dialog window. 
  1841.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  1842.          This value is a signed integer -32768 through 32767, or an expression 
  1843.          consisting of integers and the addition (+) or subtraction (-) 
  1844.          operator.  The coordinate is assumed to be in dialog units and is 
  1845.          relative to the origin of the dialog window. 
  1846.  width   Specifies the width of the control.  This value is any integer 0 
  1847.          through 65535, or an expression consisting of integers and the 
  1848.          addition (+) or subtraction (-) operator. The width is in n-character 
  1849.          units. 
  1850.  height  Specifies the height of the control.  This value is any integer 0 
  1851.          through 65535, or an expression consisting of integers and the 
  1852.          addition (+) or subtraction (-) operator. The height is in 
  1853.          1/8-character units. 
  1854.  style   Specifies the control styles.  This value can be a combination of the 
  1855.          styles specified for WC_ENTRYFIELD.  You can use the bitwise OR ( | ) 
  1856.          operator to combine styles. 
  1857.  
  1858.  Comments 
  1859.  
  1860.  The EDITTEXT control statement is identical to the ENTRYFIELD control 
  1861.  statement. 
  1862.  
  1863.  Use the EDITTEXT statement only in a DIALOG or WINDOW statement. 
  1864.  
  1865.  Example 
  1866.  
  1867.  This example creates an entry-field control that is not labeled. 
  1868.  
  1869.      EDITTEXT "", 101, 10, 10, 24, 50
  1870.  
  1871.  
  1872. ΓòÉΓòÉΓòÉ 2.5.20. elif Directive ΓòÉΓòÉΓòÉ
  1873.  
  1874. Syntax: 
  1875.  
  1876.   elif constant-expression
  1877.  
  1878. The elif directive marks an optional clause of a conditional-compilation block 
  1879. defined by a ifdef, ifndef, or if directive.  The directive controls 
  1880. conditional compilation of the resource file by checking the specified constant 
  1881. expression.  If the constant expression is nonzero, elif directs the compiler 
  1882. to continue processing statements up to the next endif, else, or elif directive 
  1883. and then skip to the statement after endif.  If the constant expression is 
  1884. zero, elif directs the compiler to skip to the next endif, else, or elif 
  1885. directive.  You can use any number of elif directives in a conditional block. 
  1886.  
  1887.  constant-expression   Specifies the expression to be checked.  This value is a 
  1888.                        defined name, an integer constant, or an expression 
  1889.                        consisting of names, integers, and arithmetic and 
  1890.                        relational operators. 
  1891.  
  1892.  Example 
  1893.  
  1894.  In this example, elif directs the compiler to process the second BITMAP 
  1895.  statement only if the value assigned to the name "Version" is less than 7. 
  1896.  The elif directive itself is processed only if Version is greater than or 
  1897.  equal to 3. 
  1898.  
  1899.   #if Version < 3
  1900.   BITMAP 1 errbox.bmp
  1901.   #elif Version < 7
  1902.   BITMAP 1 userbox.bmp
  1903.   #endif
  1904.  
  1905.  
  1906. ΓòÉΓòÉΓòÉ 2.5.21. else Directive ΓòÉΓòÉΓòÉ
  1907.  
  1908. Syntax: 
  1909.  
  1910.   else
  1911.  
  1912. The else directive marks an optional clause of a conditional-compilation block 
  1913. defined by a ifdef, ifndef, or if directive.  The else directive must be the 
  1914. last directive before the endif directive. 
  1915.  
  1916. This directive has no arguments. 
  1917.  
  1918. Example 
  1919.  
  1920. This example compiles the second BITMAP statement only if the name "DEBUG" is 
  1921. not defined. 
  1922.  
  1923.     #ifdef DEBUG
  1924.         BITMAP 1 errbox.bmp
  1925.     #else
  1926.         BITMAP 1 userbox.bmp
  1927.     #endif
  1928.  
  1929.  
  1930. ΓòÉΓòÉΓòÉ 2.5.22. endif Directive ΓòÉΓòÉΓòÉ
  1931.  
  1932. Syntax: 
  1933.  
  1934.   endif
  1935.  
  1936. The endif directive marks the end of a conditional-compilation block defined by 
  1937. a ifdef directive.  One endif is required for each if, ifdef, or ifndef 
  1938. directive. 
  1939.  
  1940. This directive has no arguments. 
  1941.  
  1942.  
  1943. ΓòÉΓòÉΓòÉ 2.5.23. ENTRYFIELD Statement ΓòÉΓòÉΓòÉ
  1944.  
  1945. Syntax: 
  1946.  
  1947.   ENTRYFIELD text, id, x, y, width, height , [style]
  1948.  
  1949. The ENTRYFIELD statement creates an entry-field control.  This control is a 
  1950. rectangle in which the user can type and edit text.  The control displays a 
  1951. pointer when the user selects the control.  The user can then use the keyboard 
  1952. to enter text or edit the existing text. Editing keys include the BACKSPACE and 
  1953. DELETE keys.  By using the mouse or the DIRECTION keys, the user can select the 
  1954. character or characters to delete or select the place to insert new characters. 
  1955. The ENTRYFIELD statement, which you can use only in a DIALOG or WINDOW 
  1956. statement, defines the text, identifier, dimensions, and attributes of a 
  1957. control window.  The predefined class for this control is WC_ENTRYFIELD.  If 
  1958. you do not specify a style, the default style is ES_AUTOSCROLL and WS_TABSTOP. 
  1959.  
  1960.  text    Specifies text that is displayed in the rectangular area of the 
  1961.          control.  This field must contain zero or more characters enclosed in 
  1962.          double quotation marks.  Character values must be in the range 1 
  1963.          through 255.  If a double quotation mark is required in the text, you 
  1964.          must include the double quotation mark twice. 
  1965.  id      Specifies the control identifier. This value must be a signed integer 
  1966.          in the range -32768 through 32767, an unsigned integer in the range of 
  1967.          1 through 65535, or a simple expression that evaluates to a value in 
  1968.          these ranges. 
  1969.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  1970.          This value must be a signed integer in the range -32768 through 32767 
  1971.          or an expression consisting of integers and the addition (+) or 
  1972.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  1973.          units and is relative to the origin of the dialog box, window, or 
  1974.          control containing the specified control. 
  1975.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  1976.          This value must be a signed integer in the range -32768 through 32767 
  1977.          or an expression consisting of integers and the addition (+) or 
  1978.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  1979.          units and is relative to the origin of the dialog box, window, or 
  1980.          control containing the specified control. 
  1981.  width   Specifies the width of the control.  This value must be an integer in 
  1982.          the range 0 through 65535 or an expression consisting of integers and 
  1983.          the addition (+) or subtraction (-) operator.  The width is in 
  1984.          n-character units. 
  1985.  height  Specifies the height of the control.  This value must be an integer in 
  1986.          the range 0 through 65535 or an expression consisting of integers and 
  1987.          the addition (+) or subtraction (-) operator.  The height is in 
  1988.          1/8-character units. 
  1989.  style   Specifies the control styles.  This value can be a combination of the 
  1990.          styles specified for WC_ENTRYFIELD. You can use the bitwise OR (|) 
  1991.          operator to combine styles. 
  1992.  
  1993.  Example 
  1994.  
  1995.  This example creates an entry-field control that is not labeled. 
  1996.  
  1997.   ENTRYFIELD "", 101, 10, 10, 24, 50
  1998.  
  1999.  
  2000. ΓòÉΓòÉΓòÉ 2.5.24. FONT Statement ΓòÉΓòÉΓòÉ
  2001.  
  2002. Syntax: 
  2003.  
  2004.   FONT font-id  [load-option] [mem-option] [codepage]  filename
  2005.  
  2006. The FONT statement defines a font resource for an application. A font resource, 
  2007. typically created by using the OS/2 Font Editor, is a bit map defining the 
  2008. shape of the individual characters in a character set.  The FONT statement 
  2009. copies the font resource from the file specified in the filename field and adds 
  2010. it to the other resources of the application.  A font resource can be loaded 
  2011. from the executable file when needed by using the GpiLoadFonts function. 
  2012.  
  2013. You can provide any number of FONT statements in a resource script file, but 
  2014. each statement must specify a unique font-id value. 
  2015.  
  2016.  font-id           Specifies the font-resource identifier. This value must be 
  2017.                    an unsigned integer in the range of 1 through 65535, or a 
  2018.                    simple expression that evaluates to a value in these ranges. 
  2019.                    Character strings cannot be used as resource identifiers for 
  2020.                    this statement. 
  2021.  load-option       Specifies when the system loads the resource from the 
  2022.                    executable file into memory.  This value must be one of the 
  2023.                    following: 
  2024.                    PRELOAD             System loads the resource when the 
  2025.                                        application starts. 
  2026.                    LOADONCALL          System loads the resource when the 
  2027.                                        application calls the GpiLoadFonts 
  2028.                                        function.  This is the default option. 
  2029.  mem-option        Specifies how the system manages the resource when it is i 
  2030.                    memory.  This value must be one or more of the following: 
  2031.                    FIXED               System keeps the resource at a fixed 
  2032.                                        memory location. 
  2033.                    MOVEABLE            System moves the resource as necessary 
  2034.                                        to compact memory. 
  2035.                    DISCARDABLE         System discards the resource if it is no 
  2036.                                        longer needed. The default setting is 
  2037.                    MOVEABLE and DISCARDABLE. 
  2038.  codepage          Specifies a code page value.  For a list of valid code pages 
  2039.                    see CODEPAGE Statement. 
  2040.  filename          Specifies the name of the file containing the font resource. 
  2041.                    If the file is not in the current directory, filename must 
  2042.                    be preceded by a full path. 
  2043.  
  2044.  Example 
  2045.  
  2046.  This example defines a font whose font identifier is 5. The font resource is 
  2047.  copied from the file cmroman.fon. 
  2048.  
  2049.   FONT 5 cmroman.fon
  2050.  
  2051.  
  2052. ΓòÉΓòÉΓòÉ 2.5.25. FRAME Statement ΓòÉΓòÉΓòÉ
  2053.  
  2054. Syntax: 
  2055.  
  2056.   FRAME text, id, x, y, width, height[, style[, framectl]]
  2057.         data-definitions
  2058.   [ BEGIN
  2059.   window-definition
  2060.       .
  2061.       .
  2062.       .
  2063.   END ]
  2064.  
  2065. The FRAME statement defines a frame window.  The statement defines the title, 
  2066. identifier, position, and dimensions of the frame window, as well as the window 
  2067. style.  The FRAME statement is most often used in a WINDOWTEMPLATE statement, 
  2068. and typically, only one FRAME statement is used.  The FRAME statement, in turn, 
  2069. typically contains at least one WINDOW statement that defines the client window 
  2070. belonging to the frame window. 
  2071.  
  2072. The frame window has no default style.  You must use the framectl field to 
  2073. define additional frame controls, such as a title bar and system menu, to be 
  2074. created when the frame window is created.  If the text field is not empty, the 
  2075. statement automatically adds a title-bar control to the frame window, whether 
  2076. or not you specify the FCF_TITLEBAR style.  Frame controls are given default 
  2077. styles and control identifiers depending on their class.  For example, a 
  2078. title-bar control receives the identifier FID_TITLEBAR. 
  2079.  
  2080.  text        Specifies the title of the frame window.  This field must contain 
  2081.              zero or more characters enclosed in double quotation marks. 
  2082.              Character values must be in the range 1 through 255.  If a double 
  2083.              quotation mark is required in the name, you must include the 
  2084.              double quotation mark twice. 
  2085.  id          Specifies the window identifier.  This value must be a signed 
  2086.              integer in the range -32768 through 32767, an unsigned integer in 
  2087.              the range of 1 through 65535, or a simple expression that 
  2088.              evaluates to a value in these ranges. 
  2089.  x           Specifies the x-coordinate of the lower-left corner of the window. 
  2090.              This value must be a signed integer in the range -32768 through 
  2091.              32767 or an expression consisting of integers and the addition (+) 
  2092.              or subtraction (-) operator.  The coordinate is assumed to be in 
  2093.              dialog units and is relative to the origin of the dialog box, 
  2094.              window, or control containing the specified window. 
  2095.  y           Specifies the y-coordinate of the lower-left corner of the window. 
  2096.              This value must be a signed integer in the range -32768 through 
  2097.              32767 or an expression consisting of integers and the addition (+) 
  2098.              or subtraction (-) operator.  The coordinate is assumed to be in 
  2099.              dialog units and is relative to the origin of the dialog box, 
  2100.              window, or control containing the specified window. 
  2101.  width       Specifies the width of the window.  This value must be an integer 
  2102.              in the range 0 through 65535 or an expression consisting of 
  2103.              integers and the addition (+) or subtraction (-) operator.  The 
  2104.              width is in n-character units. 
  2105.  height      Specifies the height of the window.  This value must be a integer 
  2106.              in the range 0 through 65535 or an expression consisting of 
  2107.              integers and the addition (+) or subtraction (-) operator.  The 
  2108.              height is in 1/8-character units. 
  2109.  style       Specifies the frame and window styles.  This value can be a 
  2110.              combination of frame styles. You can use the bitwise OR (|) 
  2111.              operator to combine styles. 
  2112.  framectl    Specifies the styles of frame controls belonging to the frame 
  2113.              window.  This value can be a combination of the styles specified 
  2114.              in the "Frame-Control Styles" table in the Presentation Manager 
  2115.              Programmers Reference. You can use the bitwise OR (|) operator to 
  2116.              combine styles. 
  2117.  data-definitions Specifies a CTLDATA and/or PRESPARAMS statement.  These 
  2118.              statements define control and presentation data for the frame 
  2119.              window.  For more information, see CTLDATA Statement and 
  2120.              PRESPARAMS Statement. 
  2121.  window-definition Specifies a WINDOW statement or any one of several 
  2122.              predefined control statements.  These statements define the style, 
  2123.              position, and dimensions of windows or controls in the frame 
  2124.              window. 
  2125.  
  2126.  Comments 
  2127.  
  2128.  The FRAME statement can actually contain any combination of CONTROL, DIALOG, 
  2129.  and WINDOW statements.  Typically, a FRAME statement contains one WINDOW 
  2130.  statement. 
  2131.  
  2132.  Example 
  2133.  
  2134.  This example creates a standard frame window, with a title bar, a system menu, 
  2135.  minimize and maximize boxes, and a vertical scroll bar. The FRAME statement 
  2136.  contains a WINDOW statement defining the client window belonging to the frame 
  2137.  window. 
  2138.  
  2139.   WINDOWTEMPLATE 1
  2140.   BEGIN
  2141.       FRAME "My Window", 1, 10, 10, 320, 130, 0,
  2142.               FCF_STANDARD | FCF_VERTSCROLL
  2143.       BEGIN
  2144.           WINDOW "", FID_CLIENT, 0, 0, 0, 0, "MyClientClass"
  2145.       END
  2146.   END
  2147.  
  2148.  
  2149. ΓòÉΓòÉΓòÉ 2.5.26. GROUPBOX Statement ΓòÉΓòÉΓòÉ
  2150.  
  2151. Syntax: 
  2152.  
  2153.   GROUPBOX text, id, x, y, width, height [, style]
  2154.  
  2155. The GROUPBOX statement creates a group-box control.  The control is a rectangle 
  2156. that groups other controls together.  The controls are grouped by drawing a 
  2157. border around them and displaying the given text in the upper-left corner.  The 
  2158. GROUPBOX statement, which you can use only in a DIALOG or WINDOW statement, 
  2159. defines the text, identifier, dimensions, and attributes of a control window. 
  2160. The predefined class for this control is WC_STATIC.  If you do not specify a 
  2161. style, the default style is SS_GROUPBOX and WS_TABSTOP. 
  2162.  
  2163.  text    Specifies text that appears in the upper-left corner of the control. 
  2164.          This field must contain zero or more characters enclosed in double 
  2165.          quotation marks.  Character values must be in the range 1 through 255. 
  2166.          If a double quotation mark is required in the text, you must include 
  2167.          the double quotation mark twice. 
  2168.  id      Specifies the control identifier.  This value must be a signed integer 
  2169.          in the range -32768 through 32767, an unsigned integer in the range of 
  2170.          1 through 65535, or a simple expression that evaluates to a value in 
  2171.          these ranges. 
  2172.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  2173.          This value must be a signed integer in the range -32768 through 32767 
  2174.          or an expression consisting of integers and the addition (+) or 
  2175.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  2176.          units and is relative to the origin of the dialog box, window, or 
  2177.          control containing the specified control. 
  2178.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  2179.          This value must be a signed integer in the range -32768 through 32767 
  2180.          or an expression consisting of integers and the addition (+) or 
  2181.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  2182.          units and is relative to the origin of the dialog box, window, or 
  2183.          control containing the specified control. 
  2184.  width   Specifies the width of the control.  This value must be an integer in 
  2185.          the range 0 through 65535 or an expression consisting of integers and 
  2186.          the addition (+) or subtraction (-) operator.  The width is in 
  2187.          n-character units. 
  2188.  height  Specifies the height of the control.  This value must be an integer in 
  2189.          the range 0 through 65535 or an expression consisting of integers and 
  2190.          the addition (+) or subtraction (-) operator.  The height is in 
  2191.          1/8-character units. 
  2192.  style   Specifies the control styles.  This value can be a combination of the 
  2193.          styles specified for WC_STATIC. You can use the bitwise OR (|) 
  2194.          operator to combine styles. 
  2195.  
  2196.  Example 
  2197.  
  2198.  This example creates a group-box control that is labeled "Options." 
  2199.  
  2200.   GROUPBOX "Options", 101, 10, 10, 100, 100
  2201.  
  2202.  
  2203. ΓòÉΓòÉΓòÉ 2.5.27. HELPITEM Statement ΓòÉΓòÉΓòÉ
  2204.  
  2205. Syntax: 
  2206.  
  2207.   HELPITEM application-window-id, help-subtable-id, extended-helppanel-id
  2208.  
  2209. The HELPITEM statement defines the help items in a help table.  The statement, 
  2210. permitted only in a HELPTABLE statement, specifies the resource identifier of 
  2211. an application window for which help is provided, and the resource identifiers 
  2212. of the help subtable and extended help panel associated with the application 
  2213. window. 
  2214.  
  2215. You can provide any number of HELPITEM statements in a HELPTABLE statement. 
  2216. You should provide one HELPITEM statement for each application window for which 
  2217. help is provided. 
  2218.  
  2219.  application-window-id     Specifies the resource identifier of an application 
  2220.                            window for which help is provided. This value must 
  2221.                            be a signed integer in the range -32768 through 
  2222.                            32767, an unsigned integer in the range of 1 through 
  2223.                            65535, or a simple expression that evaluates to a 
  2224.                            value in these ranges. 
  2225.  
  2226.  help-subtable-id          Specifies the resource identifier of the help 
  2227.                            subtable associated with the specified application 
  2228.                            window. This value must be an unsigned integer in 
  2229.                            the range of 1 through 65535, or a simple expression 
  2230.                            that evaluates to a value in these ranges. 
  2231.  
  2232.  extended-helppanel-id     Specifies the resource identifier of the extended 
  2233.                            help panel associated with the specified application 
  2234.                            window. This value must be an integer in the range 0 
  2235.                            through 65535. However, in IPF a panel-id must be an 
  2236.                            integer in the range of 0 to 64000. 
  2237.  
  2238.  Example 
  2239.  
  2240.  This example defines a help item that associates a help subtable called 
  2241.  IDSUB_FILEMENU and an extended help panel called IDEXT_APPHLP with an 
  2242.  application window called IDWIN_FILEMENU. 
  2243.  
  2244.   HELPITEM IDWIN_FILEMENU, IDSUB_FILEMENU, IDEXT_APPHLP
  2245.  
  2246.  
  2247. ΓòÉΓòÉΓòÉ 2.5.28. HELPSUBITEM Statement ΓòÉΓòÉΓòÉ
  2248.  
  2249. Syntax: 
  2250.  
  2251.   HELPSUBITEM child-window-id, helppanel-id [ , integer...]
  2252.  
  2253. The HELPSUBITEM statement defines the help subitems in a help subtable.  This 
  2254. statement, which is permitted only in a HELPSUBTABLE statement, specifies the 
  2255. identifier of a child window for which help is provided, the identifier of the 
  2256. help panel associated with the child window, and one or more optional, 
  2257. application-defined integers. 
  2258.  
  2259. You can provide any number of HELPSUBITEM statements in a HELPSUBTABLE 
  2260. statement.  You should provide one HELPSUBITEM statement for each child window 
  2261. for which help is provided. 
  2262.  
  2263.  child-window-id     Specifies the resource identifier of the child window for 
  2264.                      which help is provided. Character strings cannot be used 
  2265.                      as resource identifiers for this statement. 
  2266.  helppanel-id        Specifies the resource identifier of the help panel 
  2267.                      associated with the specified child window. 
  2268.  integer             Specifies optional, application-defined integers.  If you 
  2269.                      use this field, you must include the SUBITEMSIZE statement 
  2270.                      in the help subtable to specify the size, in words, of 
  2271.                      each help subitem in the help subtable. For details about 
  2272.                      this statement, see SUBITEMSIZE Statement. 
  2273.  
  2274.  Example 
  2275.  
  2276.  This example defines a help subitem that associates a child window called 
  2277.  IDCLD_FILEMENU with a help panel called IDHP_FILEMENU. 
  2278.  
  2279.   HELPSUBITEM IDCLD_FILEMENU, IDHP_FILEMENU
  2280.  
  2281.  
  2282. ΓòÉΓòÉΓòÉ 2.5.29. HELPSUBTABLE Statement ΓòÉΓòÉΓòÉ
  2283.  
  2284. Syntax: 
  2285.  
  2286.   HELPSUBTABLE helpsubtable-id
  2287.     SUBITEMSIZE size
  2288.   BEGIN
  2289.   helpsubitem-definition
  2290.       .
  2291.       .
  2292.       .
  2293.   END
  2294.  
  2295. The HELPSUBTABLE statement defines the contents of a help-subtable resource.  A 
  2296. help-subtable resource contains a help-subitem entry for each item that can be 
  2297. selected in an application window.  Each of these items should be a child 
  2298. window of the application window specified in the help-table resource.  The 
  2299. help subtable should contain a help subitem for each control, child window, and 
  2300. menu item in the application window. 
  2301.  
  2302. You can provide any number of HELPSUBTABLE statements in a resource script 
  2303. file, but each statement must specify a unique helpsubtable-id value.  You can 
  2304. also provide any number of helpsubitem-definition statements in the help 
  2305. subtable.  These specify the child window for which help is provided, the help 
  2306. panel containing the help text for the child window, and one or more 
  2307. application-defined integers. 
  2308.  
  2309. If you include optional integers in the helpsubitem-definition statements, you 
  2310. must also include a SUBITEMSIZE statement to specify the size, in words, of 
  2311. each help subitem.  All help subitems in a help subtable must be the same size. 
  2312. The default size is two words per help subitem. (No SUBITEMSIZE statement is 
  2313. needed if you do not include optional integers in the helpsubitem-definition 
  2314. statement.) 
  2315.  
  2316.  helpsubtable-id 
  2317.       Specifies the resource identifier of the help subtable. This value must 
  2318.       be an unsigned integer in the range of 1 through 65535, or a simple 
  2319.       expression that evaluates to a value in these ranges. Character strings 
  2320.       cannot be used as resource identifiers for this statement. 
  2321.  helpsubitem-definition 
  2322.       Specifies a HELPSUBITEM statement.  A HELPSUBITEM statement specifies a 
  2323.       child window, the help panel associated with the child window, and one or 
  2324.       more optional, application-defined integers.  For details about this 
  2325.       statement, see HELPSUBITEM Statement. 
  2326.  
  2327.  Example 
  2328.  
  2329.  This example creates a help-subtable resource whose help-subtable identifier 
  2330.  is IDSUB_FILEMENU.  Each HELPSUBITEM statement specifies a child window and a 
  2331.  help panel. 
  2332.  
  2333.   HELPSUBTABLE IDSUB_FILEMENU
  2334.   BEGIN
  2335.       HELPSUBITEM IDCLD_OPEN, IDPNL_OPEN
  2336.       HELPSUBITEM IDCLD_SAVE, IDPNL_SAVE
  2337.   END
  2338.  
  2339.  
  2340. ΓòÉΓòÉΓòÉ 2.5.30. HELPTABLE Statement ΓòÉΓòÉΓòÉ
  2341.  
  2342. Syntax: 
  2343.  
  2344.   HELPTABLE helptable-id
  2345.   BEGIN
  2346.   helpitem-definition
  2347.       .
  2348.       .
  2349.       .
  2350.   END
  2351.  
  2352. The HELPTABLE statement defines the contents of a help-table resource. A 
  2353. help-table resource contains a help-item entry for each application window, 
  2354. dialog box, and message box for which help is provided. 
  2355.  
  2356. You can provide any number of HELPTABLE statements in a resource script file, 
  2357. but each statement must specify a unique helptable-id value.  You can also 
  2358. provide any number of helpitem-definition statements in the help table.  These 
  2359. specify the application windows for which help is provided, the help subtables 
  2360. associated with each application window, and the extended help panels 
  2361. associated with each application window. 
  2362.  
  2363.  helptable-id          Specifies the resource identifier of the help table. 
  2364.                        This value must be an unsigned integer in the range of 1 
  2365.                        through 65535, or a simple expression that evaluates to 
  2366.                        a value in these ranges. Character strings cannot be 
  2367.                        used as resource identifiers for this statement. 
  2368.  helpitem-definition   Specifies a HELPITEM statement. A HELPITEM statement 
  2369.                        specifies an application window and the associated help 
  2370.                        subtable and extended help panel. For details about this 
  2371.                        statement, see HELPITEM Statement. 
  2372.  
  2373.  Example 
  2374.  
  2375.  This example creates a help-table resource whose help-table identifier is 1. 
  2376.  Each HELPITEM statement specifies an application window, a help subtable, and 
  2377.  an extended help panel. 
  2378.  
  2379.   HELPTABLE 1
  2380.   BEGIN
  2381.       HELPITEM IDWIN_FILEMENU, IDSUB_FILEMENU, IDEXT_APPHLP
  2382.       HELPITEM IDWIN_EDITMENU, IDSUB_EDITMENU, IDEXT_APPHLP
  2383.   END
  2384.  
  2385.  
  2386. ΓòÉΓòÉΓòÉ 2.5.31. ICON Statement (Resource) ΓòÉΓòÉΓòÉ
  2387.  
  2388. Syntax: 
  2389.  
  2390.   ICON icon-id  [load-option] [ mem-option] [codepage] filename
  2391.  
  2392. This form of the ICON statement defines an icon resource for an application. 
  2393. An icon resource, typically created by using Icon Editor, is a bit map defining 
  2394. the shape of the icon to be used for a given application.  The ICON statement 
  2395. copies the icon resource from the file specified in the filename field and adds 
  2396. it to the application's other resources.  An icon resource can be loaded when 
  2397. creating a window by using the WinCreateStdWindow function with the FS_ICON 
  2398. style. 
  2399.  
  2400. You can provide any number of ICON statements in a resource script file, but 
  2401. each statement must specify a unique icon-id value. 
  2402.  
  2403.  icon-id           Specifies the icon-resource identifier.  This value must be 
  2404.                    an unsigned integer in the range of 1 through 65535, a 
  2405.                    simple expression that evaluates to a value in these ranges, 
  2406.                    or a character string. An icon-id of 1 has a special 
  2407.                    meaning; for details, see the "Comment" section. 
  2408.  load-option       Specifies when the system loads the resource from the 
  2409.                    executable file into memory.  This value must be one of the 
  2410.                    following: 
  2411.                    PRELOAD             System loads the resource when the 
  2412.                                        application starts. 
  2413.                    LOADONCALL          System loads the resource when the 
  2414.                                        application calls the WinCreateStdWindow 
  2415.                                        function.  This is the default option. 
  2416.  mem-option        Specifies how the system manages the resource when it is in 
  2417.                    memory.  This value must be one or more of the following: 
  2418.                    FIXED               System keeps the resource at a fixed 
  2419.                                        memory location. 
  2420.                    MOVEABLE            System moves the resource as necessary 
  2421.                                        to compact memory. 
  2422.                    DISCARDABLE         System discards the resource if it is no 
  2423.                                        longer needed. The default setting is 
  2424.                    MOVEABLE and DISCARDABLE. 
  2425.  codepage          Specifies a code page value.  For a list of valid code pages 
  2426.                    see CODEPAGE Statement. 
  2427.  filename          Specifies the name of the file containing the icon resource. 
  2428.                    If the file is not in the current directory, filename must 
  2429.                    be preceded by a full path. 
  2430.  
  2431.  Comments 
  2432.  
  2433.  An icon with an icon-id of 1 is the default icon.  The RC program writes the 
  2434.  icon not only to the resources in your executable file, but also as the .ICON 
  2435.  extended attribute.  File Manager will display this icon next to the name of 
  2436.  the executable file. 
  2437.  
  2438.  Example 
  2439.  
  2440.  This example defines an icon whose icon identifier is 11.  The icon resource 
  2441.  is copied from the file custom.ico. 
  2442.  
  2443.   ICON 11 custom.ico
  2444.  
  2445.  
  2446. ΓòÉΓòÉΓòÉ 2.5.32. ICON Statement (Control) ΓòÉΓòÉΓòÉ
  2447.  
  2448. Syntax: 
  2449.  
  2450.   ICON icon-id, id, x, y, width, height, [style]
  2451.  
  2452. This form of the ICON statement creates an icon control.  This control is an 
  2453. icon displayed in a dialog box.  The ICON statement, which you can use only in 
  2454. a DIALOG or WINDOW statement, defines the icon-resource identifier, 
  2455. icon-control identifier, position, and attributes of a control window.  The 
  2456. predefined class for this control is WC_STATIC.  If you do not specify a style, 
  2457. the default style is SS_ICON.  For the ICON statement, the width and height 
  2458. fields are ignored; the icon automatically sizes itself. 
  2459.  
  2460.  icon-id   Specifies the resource identifier of an icon that is defined 
  2461.            elsewhere in the resource file. 
  2462.  id        Specifies the control identifier.  This value must be a signed 
  2463.            integer in the range -32768 through 32767, an unsigned integer in 
  2464.            the range of 1 through 65535, or a simple expression that evaluates 
  2465.            to a value in these ranges. 
  2466.  x         Specifies the x-coordinate of the lower-left corner of the control. 
  2467.            This value must be a signed integer in the range -32768 through 
  2468.            32767 or an expression consisting of integers and the addition (+) 
  2469.            or subtraction (-) operator.  The coordinate is assumed to be in 
  2470.            dialog units and is relative to the origin of the dialog box, 
  2471.            window, or control containing the specified control. 
  2472.  y         Specifies the y-coordinate of the lower-left corner of the control. 
  2473.            This value must be a signed integer in the range -32768 through 
  2474.            32767 or an expression consisting of integers and the addition (+) 
  2475.            or subtraction (-) operator.  The coordinate is assumed to be in 
  2476.            dialog units and is relative to the origin of the dialog box, 
  2477.            window, or control containing the specified control. 
  2478.  width     Specifies a reserved value.  Can be set to zero. 
  2479.  height    Specifies a reserved value.  Can be set to zero. 
  2480.  style     Specifies the control styles.  This value can be a combination of 
  2481.            the styles specified for WC_STATIC. You can use the bitwise OR (|) 
  2482.            operator to combine styles. 
  2483.  
  2484.  Example 
  2485.  
  2486.  This example creates an icon control whose icon identifier is 99. 
  2487.  
  2488.   ICON 99, 101, 10, 10, 0, 0
  2489.  
  2490.  
  2491. ΓòÉΓòÉΓòÉ 2.5.33. if Directive ΓòÉΓòÉΓòÉ
  2492.  
  2493. Syntax: 
  2494.  
  2495.   if constant-expression
  2496.  
  2497. The if directive controls conditional compilation of the resource file by 
  2498. checking the specified constant expression.  If the constant expression is 
  2499. nonzero, if directs the compiler to continue processing statements up to the 
  2500. next endif, else, or elif directive and then skip to the statement after the 
  2501. endif directive.  If the constant expression is zero, if directs the compiler 
  2502. to skip to the next endif, else, or elif directive. 
  2503.  
  2504.  constant-expression   Specifies the expression to be checked.  This value is a 
  2505.                        defined name, an integer constant, or an expression 
  2506.                        consisting of names, integers, and arithmetic and 
  2507.                        relational operators. 
  2508.  
  2509.  Example 
  2510.  
  2511.  This example compiles the BITMAP statement only if the value assigned to the 
  2512.  name "Version" is less than 3. 
  2513.  
  2514.   #if Version < 3
  2515.   BITMAP 1 errbox.bmp
  2516.   #endif
  2517.  
  2518.  
  2519. ΓòÉΓòÉΓòÉ 2.5.34. ifdef Directive ΓòÉΓòÉΓòÉ
  2520.  
  2521. Syntax: 
  2522.  
  2523.   ifdef name
  2524.  
  2525. The ifdef directive controls conditional compilation of the resource file by 
  2526. checking the specified name.  If the name has been defined by using a define 
  2527. directive or by using the -d command-line option of rc, ifdef directs the 
  2528. compiler to continue with the statement immediately after the ifdef directive. 
  2529. If the name has not been defined, ifdef directs the compiler to skip all 
  2530. statements up to the next endif directive. 
  2531.  
  2532.  name    Specifies the name to be checked by the directive. 
  2533.  
  2534.  Example 
  2535.  
  2536.  This example compiles the BITMAP statement only if the name "Debug" is 
  2537.  defined. 
  2538.  
  2539.   #ifdef Debug
  2540.   BITMAP 1 errbox.bmp
  2541.   #endif
  2542.  
  2543.  
  2544. ΓòÉΓòÉΓòÉ 2.5.35. ifndef Directive ΓòÉΓòÉΓòÉ
  2545.  
  2546. Syntax: 
  2547.  
  2548.   ifndef name
  2549.  
  2550. The ifndef directive controls conditional compilation of the resource file by 
  2551. checking the specified name.  If the name has not been defined or if its 
  2552. definition has been removed by using the undef directive, ifndef directs the 
  2553. compiler to continue processing statements up to the next endif, else, or elif 
  2554. directive and then skip to the statement after the endif directive.  If the 
  2555. name is defined, ifndef directs the compiler to skip to the next endif, else, 
  2556. or elif directive. 
  2557.  
  2558.  name    Specifies the name to be checked by the directive. 
  2559.  
  2560.  Example 
  2561.  
  2562.  This example compiles the BITMAP statement only if the name "Optimize" is not 
  2563.  defined. 
  2564.  
  2565.   #ifndef Optimize
  2566.   BITMAP 1 errbox.bmp
  2567.   #endif
  2568.  
  2569.  
  2570. ΓòÉΓòÉΓòÉ 2.5.36. include Directive ΓòÉΓòÉΓòÉ
  2571.  
  2572. Syntax: 
  2573.  
  2574.   include filename
  2575.  
  2576. The include directive causes RC to process the file specified in the filename 
  2577. field.  This file should be a header file that defines the constants used in 
  2578. the resource script file.  Only the #define directives in the specified file 
  2579. are processed; all other statements are ignored by the Resource Compiler. 
  2580.  
  2581.  filename    Specifies the OS/2 name of the file to be included.  This value 
  2582.              must be an ASCII string enclosed either in double quotation marks 
  2583.              (if the file is in the current directory) or in less-than and 
  2584.              greater-than characters (<>) (if the file is in the directory 
  2585.              specified by -i command-line options or by the INCLUDE environment 
  2586.              variable).  You must give a full path enclosed in double quotation 
  2587.              marks if the file is not in the current directory or in the 
  2588.              directory specified by -i command-line  options or by the INCLUDE 
  2589.              environment variable. 
  2590.  
  2591.  Comments 
  2592.  
  2593.  The filename field is handled as a C string.  Therefore, you must include two 
  2594.  backslashes wherever one is required in the path.  (As an alternative, you can 
  2595.  use a single forward slash (/) instead of two backslashes.) 
  2596.  
  2597.  Example 
  2598.  
  2599.  This example processes the header files OS2.H and HEADERS\MYDEFS.H\I while 
  2600.  compiling the resource script file. 
  2601.  
  2602.   #include <os2.h>
  2603.   #include "headers\\\\mydefs.h"
  2604.  
  2605.  
  2606. ΓòÉΓòÉΓòÉ 2.5.37. LISTBOX Statement ΓòÉΓòÉΓòÉ
  2607.  
  2608. Syntax: 
  2609.  
  2610.   LISTBOX id, x, y, width, height[, style]
  2611.  
  2612. The LISTBOX statement creates commonly used controls for a dialog box or 
  2613. window.  The control is a rectangle containing a list of user-selectable 
  2614. strings, such as file names. 
  2615.  
  2616. The LISTBOX statement, which you can use only in a DIALOG or WINDOW statement, 
  2617. defines the identifier, dimensions, and attributes of a control window.  The 
  2618. predefined class for this control is WC_LISTBOX.  If you do not specify a 
  2619. style, the default style is WS_TABSTOP. 
  2620.  
  2621.  id      Specifies the control identifier.  This value must be a signed integer 
  2622.          in the range -32768 through 32767, an unsigned integer in the range of 
  2623.          1 through 65535, or a simple expression that evaluates to a value in 
  2624.          these ranges. 
  2625.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  2626.          This value must be a signed integer in the range -32768 through 32767 
  2627.          or an expression consisting of integers and the addition (+) or 
  2628.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  2629.          units and is relative to the origin of the dialog box, window, or 
  2630.          control containing the specified control. 
  2631.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  2632.          This value must be a signed integer in the range -32768 through 32767 
  2633.          or an expression consisting of integers and the addition (+) or 
  2634.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  2635.          units and is relative to the origin of the dialog box, window, or 
  2636.          control containing the specified control. 
  2637.  width   Specifies the width of the control.  This value must be an integer in 
  2638.          the range 0 through 65535 or an expression consisting of integers and 
  2639.          the addition (+) or subtraction (-) operator.  The width is in 
  2640.          n-character units. 
  2641.  height  Specifies the height of the control.  This value must be an integer in 
  2642.          the range 0 through 65535 or an expression consisting of integers and 
  2643.          the addition (+) or subtraction (-) operator.  The height is in 
  2644.          1/8-character units. 
  2645.  style   Specifies the control styles.  This value can be a combination of the 
  2646.          styles specified for WC_LISTBOX. You can use the bitwise OR (|) 
  2647.          operator to combine styles. 
  2648.  
  2649.  Example 
  2650.  
  2651.  This example creates a list-box control whose identifier is 101. 
  2652.  
  2653.   LISTBOX 101, 10, 10, 100, 100
  2654.  
  2655.  
  2656. ΓòÉΓòÉΓòÉ 2.5.38. LTEXT Statement ΓòÉΓòÉΓòÉ
  2657.  
  2658. Syntax: 
  2659.  
  2660.   LTEXT text, id, x, y, width, height [, style]
  2661.  
  2662. The LTEXT statement creates a left-aligned text control.  The control is a 
  2663. simple rectangle displaying the given text left-aligned in the rectangle.  The 
  2664. text is formatted before it is displayed.  Words that would extend past the end 
  2665. of a line are automatically wrapped to the beginning of the next line.  The 
  2666. LTEXT statement, which you can use only in a DIALOG or WINDOW statement, 
  2667. defines the text, identifier, dimensions, and attributes of the control.  The 
  2668. predefined class for this control is WC_STATIC.  If you do not specify a style, 
  2669. the default style is SS_TEXT, DT_LEFT, and WS_GROUP. 
  2670.  
  2671.  text    Specifies text that is left-aligned in the rectangular area of the 
  2672.          control.  This field must contain zero or more characters enclosed in 
  2673.          double quotation marks.  Character values must be in the range 1 
  2674.          through 255.  If a double quotation mark is required in the text, you 
  2675.          must include the double quotation mark twice. 
  2676.  id      Specifies the control identifier.  This value must be a signed integer 
  2677.          in the range -32768 through 32767, an unsigned integer in the range of 
  2678.          1 through 65535, or a simple expression that evaluates to a value in 
  2679.          these ranges. 
  2680.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  2681.          This value must be a signed integer in the range -32768 through 32767 
  2682.          or an expression consisting of integers and the addition (+) or 
  2683.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  2684.          units and is relative to the origin of the dialog box, window, or 
  2685.          control containing the specified control. 
  2686.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  2687.          This value must be a signed integer in the range -32768 through 32767 
  2688.          or an expression consisting of integers and the addition (+) or 
  2689.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  2690.          units and is relative to the origin of the dialog box, window, or 
  2691.          control containing the specified control. 
  2692.  width   Specifies the width of the control.  This value must be an integer in 
  2693.          the range 0 through 65535 or an expression consisting of integers and 
  2694.          the addition (+) or subtraction (-) operator.  The width is in 
  2695.          n-character units. 
  2696.  height  Specifies the height of the control.  This value must be an integer in 
  2697.          the range 0 through 65535 or an expression consisting of integers and 
  2698.          the addition (+) or subtraction (-) operator.  The height is in 
  2699.          1/8-character units. 
  2700.  style   Specifies the control styles.  This value can be a combination of the 
  2701.          styles specified for WC_STATIC. You can use the bitwise OR (|) 
  2702.          operator to combine styles. 
  2703.  
  2704.  Example 
  2705.  
  2706.  This example creates a left-aligned text control that is labeled "Filename." 
  2707.  
  2708.   LTEXT "Filename", 101, 10, 10, 100, 100
  2709.  
  2710.  
  2711. ΓòÉΓòÉΓòÉ 2.5.39. MENU Statement ΓòÉΓòÉΓòÉ
  2712.  
  2713. Syntax: 
  2714.  
  2715.   MENU menu-id  [load-option] [mem-option] [codepage]
  2716.   BEGIN
  2717.   menuitem-definition
  2718.       .
  2719.       .
  2720.       .
  2721.   END
  2722.  
  2723. The MENU statement defines the contents of a menu resource.  A menu resource is 
  2724. a collection of information that defines the appearance and function of an 
  2725. application menu.  A menu is a special input tool that lets a user choose 
  2726. commands from a list of command names.  A menu resource can be loaded from the 
  2727. executable file when needed by using the WinLoadMenu function. 
  2728.  
  2729. You can provide any number of MENU statements in a resource script file, but 
  2730. each statement must specify a unique menu-id value.  You can provide any number 
  2731. of menuitem-definition statements in the menu. These define the submenus and 
  2732. menu items (commands) in the menu.  The order of the statements defines the 
  2733. order of the menu items. 
  2734.  
  2735.  menu-id               Specifies the menu-resource identifier.  This value must 
  2736.                        be an unsigned integer in the range of 1 through 65535, 
  2737.                        a simple expression that evaluates to a value in these 
  2738.                        ranges, or a character string. 
  2739.  load-option           Specifies when the system loads the resource from the 
  2740.                        executable file into memory.  This value must be one of 
  2741.                        the following: 
  2742.                        PRELOAD             System loads the resource when the 
  2743.                                            application starts. 
  2744.                        LOADONCALL          System loads the resource when the 
  2745.                                            application calls the WinLoadMenu 
  2746.                                            function. This is the default 
  2747.                                            option. 
  2748.  mem-option            Specifies how the system manages the resource when it is 
  2749.                        in memory.  This value must be one or more of the 
  2750.                        following: 
  2751.                        FIXED               System keeps the resource at a fixed 
  2752.                                            memory location. 
  2753.                        MOVEABLE            System moves the resource as 
  2754.                                            necessary to compact memory. 
  2755.                        DISCARDABLE         System discards the resource if it 
  2756.                                            is no longer needed. The default 
  2757.                        setting is MOVEABLE and DISCARDABLE. 
  2758.  codepage              Specifies a codepage value.  For a list of valid code 
  2759.                        pages see CODEPAGE Statement. 
  2760.  menuitem-definition   Specifies a PRESPARAMS, MENUITEM, or SUBMENU statement. 
  2761.                        You can use one or more PRESPARAMS statements to control 
  2762.                        the appearance of a menu, such as the font and the 
  2763.                        foreground and background colors.  If used, PRESPARAMS 
  2764.                        statements must be the first statements following the 
  2765.                        BEGIN keyword.  For details about the PRESPARAMS 
  2766.                        statement, see PRESPARAMS Statement. 
  2767.  
  2768.                        MENUITEM and SUBMENU statements define the individual 
  2769.                        commands or submenus in the given menu.  For details 
  2770.                        about these statements, see MENUITEM Statement and 
  2771.                        SUBMENU Statement. 
  2772.  
  2773.  Example 
  2774.  
  2775.  This example creates a menu resource whose menu identifier is 1. The menu 
  2776.  contains a menu item named Alpha and a submenu named Beta. The submenu 
  2777.  contains two menu items, Item 1 and Item 2. 
  2778.  
  2779.   MENU 1
  2780.   BEGIN
  2781.       MENUITEM "Alpha", 100
  2782.       SUBMENU "Beta", 101
  2783.       BEGIN
  2784.           MENUITEM "Item 1", 200
  2785.           MENUITEM "Item 2", 201, , MIA_CHECKED
  2786.       END
  2787.   END
  2788.  
  2789.  
  2790. ΓòÉΓòÉΓòÉ 2.5.40. MENUITEM Statement ΓòÉΓòÉΓòÉ
  2791.  
  2792. Syntax: 
  2793.  
  2794.   MENUITEM text, menu-id[,  menuitem-style] [, menuitem-attribute]
  2795.  
  2796. The MENUITEM statement creates a menu item for a menu.  The statement, 
  2797. permitted only in a MENU or SUBMENU statement, defines the text, identifier, 
  2798. and attributes of a menu item.  The system displays the text when it displays 
  2799. the corresponding menu.  If the user chooses the menu item, the system 
  2800. generates a WM_COMMAND message that includes the specified menu-item identifier 
  2801. and sends it to the window owning the menu. 
  2802.  
  2803. MENUITEM SEPARATOR 
  2804.  
  2805. The alternative form of the MENUITEM statement, MENUITEM SEPARATOR, creates a 
  2806. menu separator.  A menu separator is a horizontal dividing bar between two menu 
  2807. items in a submenu.  The separator is not active - that is, the user cannot 
  2808. choose it, it has no text associated with it, and it has no identifier. 
  2809.  
  2810.  text              Specifies the text of the menu item.  This field must 
  2811.                    contain zero or more characters enclosed in double quotation 
  2812.                    marks.  Character values must be in the range 1 through 255. 
  2813.                    If a double quotation mark is required in the string, you 
  2814.                    must include the double quotation mark twice.  The tilde 
  2815.                    character ( ~ ) and the \t and \a character combinations 
  2816.                    have special meanings in the string; for details, see the 
  2817.                    "Comments" section. 
  2818.  
  2819.                    If the menuitem-style field is MIS_BITMAP, item-name must be 
  2820.                    a bit-map identifier instead of a name. The bit-map 
  2821.                    identifier must have been previously defined using a BITMAP 
  2822.                    statement, must be preceded by the \b character, and must be 
  2823.                    enclosed in double quotation marks. 
  2824.  
  2825.  menu-id           Specifies the menu-item identifier.  This value must be a 
  2826.                    signed integer in the range -32768 through 32767, an 
  2827.                    unsigned integer in the range of 1 through 65535, or a 
  2828.                    simple expression that evaluates to a value in these ranges. 
  2829.  
  2830.                    Duplicate menu-item identifiers are allowed, but menu items 
  2831.                    with non-unique identifiers cannot receive messages. 
  2832.  
  2833.                    Character strings cannot be used as resource identifiers for 
  2834.                    this statement. 
  2835.  
  2836.  menuitem-style    Specifies the menu-item style.  This value can be a 
  2837.                    combination of the following: 
  2838.  
  2839.                    MIS_BITMAP               Specifies that item-name is a bit 
  2840.                                             map identifier. 
  2841.                    MIS_BREAK                Specifies that the menu has 
  2842.                                             multiple columns of items in one 
  2843.                                             pull-down menu or multiple lines of 
  2844.                                             menus in the top-level menu. 
  2845.                    MIS_BREAKSEPARATOR       Specifies that the menu has a 
  2846.                                             vertical line between the columns 
  2847.                                             in a pull-down menu. 
  2848.                    MIS_BUTTONSEPARATOR      Specifies that the user can 
  2849.                                             activate the menu item only by 
  2850.                                             using the mouse.  The text is 
  2851.                                             centered in the item, rather than 
  2852.                                             left justified.  This option is 
  2853.                                             used for the Help item on the right 
  2854.                                             side of the menu bar. 
  2855.                    MIS_HELP                 Specifies that the menu item 
  2856.                                             generates a WM_HELP message. 
  2857.                    MIS_OWNERDRAW            Specifies that the menu item is 
  2858.                                             drawn by the owner window. 
  2859.                    MIS_SEPARATOR            Specifies that the menu item is a 
  2860.                                             menu separator. 
  2861.                    MIS_STATIC               Specifies that the user cannot 
  2862.                                             choose the menu item. 
  2863.                    MIS_SUBMENU              Specifies that the MENUITEM 
  2864.                                             statement is to be treated as a 
  2865.                                             SUBMENU statement.  When you 
  2866.                                             specify this option, you must 
  2867.                                             follow the MENUITEM statement with 
  2868.                                             a BEGIN and END clause, as in a 
  2869.                                             SUBMENU statement.  You may include 
  2870.                                             a PRESPARAMS statement immediately 
  2871.                                             after the BEGIN keyword. 
  2872.                    MIS_SYSCOMMAND           Specifies that the menu item 
  2873.                                             generates a WM_SYSCOMMAND message. 
  2874.                    MIS_TEXT                 Specifies that item-name is a 
  2875.                                             character string.  This is the 
  2876.                                             default option. 
  2877.  
  2878.  menuitem-attribute Specifies the menu-item attributes.  This value can be a 
  2879.                    combination of the following: 
  2880.  
  2881.                    MIA_CHECKED              Places a check mark next to the 
  2882.                                             menu-item name. 
  2883.                    MIA_DISABLED             Disables the menu item, preventing 
  2884.                                             the system from generating a 
  2885.                                             message when the user chooses the 
  2886.                                             command. 
  2887.                    MIA_FRAMED               Places a frame (heavy border) 
  2888.                                             around the menu item. 
  2889.                    MIA_HILITED              Places a highlight on the menu-item 
  2890.                                             name when it is displayed, by 
  2891.                                             inverting the name and background. 
  2892.                    MIA_NODISMISS            Causes a submenu or menu item to 
  2893.                                             remain displayed after the user 
  2894.                                             chooses an item. 
  2895.  
  2896.  Comments 
  2897.  
  2898.  You can use the \t or \a character combination in any item name. The \t 
  2899.  character inserts a tab when the name is displayed and is typically used to 
  2900.  separate the menu-item name from the name of an accelerator key.  The \a 
  2901.  character aligns to the right all text that follows it.  These characters are 
  2902.  intended to be used for menu items in submenus only.  The width of the 
  2903.  displayed submenu is always adjusted so that there is at least one space (and 
  2904.  usually more) between any pieces of text separated by a \t or a \a.  (When 
  2905.  compiling the menu resource, the compiler stores the \t and \a characters as 
  2906.  control characters.  For example, the \t is stored as 0x09.) 
  2907.  
  2908.  A tilde ( ~ ) character in the item name indicates that the following 
  2909.  character is used as a mnemonic character for the item. When the menu is 
  2910.  displayed, the tilde is not shown, but the mnemonic character is underlined. 
  2911.  The user can choose the menu item by pressing the key corresponding to the 
  2912.  underlined mnemonic character. 
  2913.  
  2914.  Example 
  2915.  
  2916.  This example creates a menu item named Alpha.  The item identifier is 101. 
  2917.  
  2918.   MENUITEM "Alpha", 101
  2919.  
  2920.  This example creates a menu item named Beta.  The item identifier is 102. The 
  2921.  menu item has a text style and a checked attribute. 
  2922.  
  2923.   MENUITEM "Beta", 102, MIS_TEXT, MIA_CHECKED
  2924.  
  2925.  This example creates a menu separator between menu items named Gamma and 
  2926.  Delta. 
  2927.  
  2928.   MENUITEM "Gamma", 103
  2929.   MENUITEM SEPARATOR
  2930.   MENUITEM "Delta", 104
  2931.  
  2932.  This example creates a menu item that has a bit map instead of a name. The 
  2933.  bit-map identifier, 1, is first defined using a BITMAP statement. The 
  2934.  identifier for the menu item is 301.  Note that a sign must be placed in front 
  2935.  of the bit map identifier in the MENUITEM statement. 
  2936.  
  2937.   BITMAP 1 mybitmap.bmp
  2938.  
  2939.   MENUITEM "#1", 301, MIS_BITMAP
  2940.  
  2941.  
  2942. ΓòÉΓòÉΓòÉ 2.5.41. MESSAGETABLE Statement ΓòÉΓòÉΓòÉ
  2943.  
  2944. Syntax: 
  2945.  
  2946.   MESSAGETABLE  [load-option] [mem-option] [codepage]
  2947.   BEGIN
  2948.   string-id string-definition
  2949.       .
  2950.       .
  2951.       .
  2952.   END
  2953.  
  2954. The MESSAGETABLE statement creates one or more string resources for an 
  2955. application.  A string resource is a null-terminated character string that has 
  2956. a unique string identifier.  A string resource can be loaded from the 
  2957. executable file when needed by using the DosGetResource function with the 
  2958. RT_MESSAGE resource type. RT_MESSAGE resources are bundled together in groups 
  2959. of 16, with any missing IDs replaced with zero length strings. Each group, or 
  2960. bundle, is assigned a unique sequential identifier. The resource string 
  2961. identifier is not necessarily the same as the identifier specified when using 
  2962. DosGetResource. The formula for calculating the identifier of the resource 
  2963. bundle, for use in DosGetResource, is as follows: 
  2964.  
  2965. bundle ID = (id / 16) + 1
  2966. where id is the string identifier assigned in the RC file. 
  2967.  
  2968. Thus, bundle 1 contains strings 0 to 15, bundle 2 contains strings 16 to 31, 
  2969. and so on. Once the address of the bundle has been returned by DosGetResource 
  2970. (using the calculated identifier), the buffer can be parsed to locate the 
  2971. particular string within the bundle. The number of the string is calculated by 
  2972. the formula: 
  2973.  
  2974. string = id % 16
  2975. (string = remainder for id/16). 
  2976.  
  2977. The buffer returned consists of the CodePage of the strings in the first 
  2978. USHORT, followed by the 16 strings in the bundle. The first BYTE of each string 
  2979. is the length of the string (including the null terminator), followed by the 
  2980. string and the terminator. A zero length string is represented by two bytes: 
  2981. 01 (string length) followed by the null terminator. 
  2982.  
  2983. You can provide any number of MESSAGETABLE statements in a resource script 
  2984. file.  The compiler treats all the strings from the various MESSAGETABLE 
  2985. statements as if they belonged to a single statement. This means that no two 
  2986. strings in a resource script file can have the same string identifier. 
  2987.  
  2988. Although the MESSAGETABLE and STRINGTABLE statements are nearly identical, most 
  2989. applications use the STRINGTABLE statement instead of the MESSAGETABLE 
  2990. statement to create string resources. 
  2991.  
  2992.  load-option    Specifies when the system loads the resource from the 
  2993.                 executable file into memory.  This value must be one of the 
  2994.                 following: 
  2995.                 PRELOAD             System loads the resource when the 
  2996.                                     application starts. 
  2997.                 LOADONCALL          System loads the resource when the 
  2998.                                     application calls the DosGetResource or 
  2999.                                     DosGetResource2 function.  This is the 
  3000.                                     default option. 
  3001.  mem-option     Specifies how the system manages the resource when it is in 
  3002.                 memory.  This value must be one or more of the following: 
  3003.                 FIXED               System keeps the resource at a fixed memory 
  3004.                                     location. 
  3005.                 MOVEABLE            System moves the resource as necessary to 
  3006.                                     compact memory. 
  3007.                 DISCARDABLE         System discards the resource if it is no 
  3008.                                     longer needed. The default setting is 
  3009.                 MOVEABLE and DISCARDABLE. 
  3010.  codepage       Specifies a code page value.  See CODEPAGE Statement for a list 
  3011.                 of valid code pages. 
  3012.  string-id      Specifies the character-string identifier.  This value must be 
  3013.                 a signed integer in the range -32768 through 32767, an unsigned 
  3014.                 integer in the range of 1 through 65535, or a simple expression 
  3015.                 that evaluates to a value in these ranges.  The value can be 
  3016.                 specified in decimal or hexadecimal notation.  Each string 
  3017.                 identifier in a resource script file must be unique. 
  3018.  string-definition Specifies a character string.  This field must contain zero 
  3019.                 or more characters enclosed in double quotation marks. 
  3020.                 Character values must be in the range 1 through 255.  If a 
  3021.                 double quotation mark is required in the string, you must 
  3022.                 provide the double quotation mark twice. 
  3023.  
  3024.  Comments 
  3025.  
  3026.  You can continue a string on multiple lines by terminating the line with a 
  3027.  backslash (\) or by terminating the line with a double quotation mark (") and 
  3028.  then starting the next line with a double quotation mark. 
  3029.  
  3030.  Example 
  3031.  
  3032.  This example creates two string resources whose string identifiers are 1 and 
  3033.  2. 
  3034.  
  3035.   MESSAGETABLE
  3036.   BEGIN
  3037.       1 "Filename not found"
  3038.       2 "Cannot open file for reading"
  3039.   END
  3040.  
  3041.  
  3042. ΓòÉΓòÉΓòÉ 2.5.42. MLE Statement ΓòÉΓòÉΓòÉ
  3043.  
  3044. Syntax: 
  3045.  
  3046.   MLE text, id, x, y, width, height[, style]
  3047.  
  3048. The MLE statement creates a multiple-line entry-field control.  The control is 
  3049. a rectangle in which the user can type and edit multiple lines of text.  The 
  3050. control displays a pointer when the user selects it.  The user can then use the 
  3051. keyboard to enter text or edit the existing text.  Editing keys include the 
  3052. BACKSPACE and DELETE keys. By using the mouse or the DIRECTION keys, the user 
  3053. can select the character or characters to delete or select the place to insert 
  3054. new characters.  The MLE statement, which you can use only in a DIALOG or 
  3055. WINDOW statement, defines the text, identifier, dimensions, and attributes of a 
  3056. control window.  The predefined class for this control is WC_MLE.  If you do 
  3057. not specify a style, the default style is MLS_BORDER, WS_GROUP, and WS_TABSTOP. 
  3058.  
  3059.  text    Specifies text that is displayed in the rectangular area of the 
  3060.          control.  If the MLS_READONLY style is not specified, the user can 
  3061.          edit the text.  This field must contain zero or more characters 
  3062.          enclosed in double quotation marks.  Character values must be in the 
  3063.          range 1 through 255.  If a double quotation mark is required in the 
  3064.          text, you must include the double quotation mark twice. 
  3065.  id      Specifies the control identifier.  This value must be a signed integer 
  3066.          in the range -32768 through 32767, an unsigned integer in the range of 
  3067.          1 through 65535, or a simple expression that evaluates to a value in 
  3068.          these ranges. 
  3069.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  3070.          This value must be a signed integer in the range -32768 through 32767 
  3071.          or an expression consisting of integers and the addition (+) or 
  3072.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  3073.          units and is relative to the origin of the dialog box, window, or 
  3074.          control containing the specified control. 
  3075.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  3076.          This value must be a signed integer in the range -32768 through 32767 
  3077.          or an expression consisting of integers and the addition (+) or 
  3078.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  3079.          units and is relative to the origin of the dialog box, window, or 
  3080.          control containing the specified control. 
  3081.  width   Specifies the width of the control.  This value must be an integer in 
  3082.          the range 0 through 65535 or an expression consisting of integers and 
  3083.          the addition (+) or subtraction (-) operator.  The width is in 
  3084.          n-character units. 
  3085.  height  Specifies the height of the control.  This value must be an integer in 
  3086.          the range 0 through 65535 or an expression consisting of integers and 
  3087.          the addition (+) or subtraction (-) operator.  The height is in 
  3088.          1/8-character units. 
  3089.  style   Specifies the control styles.  This value can be a combination of the 
  3090.          styles specified for WC_MLE. You can use the bitwise OR (|) operator 
  3091.          to combine styles. 
  3092.  
  3093.  Example 
  3094.  
  3095.  This example creates a multiple-line entry-field control that is not labeled. 
  3096.  
  3097.   MLE "", 101, 10, 10, 50, 100
  3098.  
  3099.  
  3100. ΓòÉΓòÉΓòÉ 2.5.43. NOTEBOOK Statement ΓòÉΓòÉΓòÉ
  3101.  
  3102. Syntax: 
  3103.  
  3104.   NOTEBOOK   id, x, y, width, height[, style]
  3105.  
  3106. The NOTEBOOK statement creates a notebook control within the dialog window. 
  3107. This control is used to organize information on individual pages so that it can 
  3108. be located and displayed easily. The NOTEBOOK statement defines the identifier, 
  3109. position, dimensions, and attributes of a notebook control. The predefined 
  3110. class for this control is WC_NOTEBOOK. If you do not specify a style, the 
  3111. default style is WS_TABSTOP and WS_VISIBLE. 
  3112.  
  3113.  id      Specifies the control identifier.  The value is a signed integer 
  3114.          -32768 through 32767, an unsigned integer in the range of 1 through 
  3115.          65535, or a simple expression that evaluates to a value in these 
  3116.          ranges. 
  3117.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  3118.          The value is a signed integer -32768 through 32767 or an expression 
  3119.          consisting of integers and the addition (+) or subtraction (-) 
  3120.          operator.  The coordinate is assumed to be in dialog units and is 
  3121.          relative to the origin of the dialog window. 
  3122.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  3123.          The value is a signed integer -32768 through 32767 or an expression 
  3124.          consisting of integers and the addition (+) or subtraction (-) 
  3125.          operator.  The coordinate is assumed to be in dialog units and is 
  3126.          relative to the origin of the dialog window. 
  3127.  width   Specifies the width of the control.  The value is any integer 0 
  3128.          through 65535 or an expression consisting of integers and the addition 
  3129.          (+) or subtraction (-) operator. The width is in n-character units. 
  3130.  height  Specifies the height of the control.  The value is any integer 0 
  3131.          through 65535 or an expression consisting of integers and the 
  3132.          addition (+) or subtraction (-) operator. The height is in 
  3133.          1/8-character units. 
  3134.  style   Specifies the control styles.  This value can be a combination of the 
  3135.          styles specified for WC_NOTEBOOK.  You can use the bitwise OR ( | ) 
  3136.          operator to combine styles. 
  3137.  
  3138.  Comments 
  3139.  
  3140.  The NOTEBOOK statement is used only in a DIALOG or WINDOW statement. 
  3141.  
  3142.  Example 
  3143.  
  3144.  This example creates a notebook control at position (20, 20) within the dialog 
  3145.  window.  The notebook has a width of 200 character units and a height of 50 
  3146.  character units.  Its resource identifier is 201. The tabs style 
  3147.  BKS_ROUNDEDTABS specification overrides the notebook default style of square 
  3148.  tabs. The default styles WS_TABSTOP and WS_GROUP are both in effect, though 
  3149.  only the latter is specified. 
  3150.  
  3151.   #define    IDC_NOTEBOOK     201
  3152.   #define    IDD_NOTEBOOKDLG  503
  3153.   DIALOG "Notebook", IDD_NOTEBOOKDLG, 11, 11, 420, 420, FS_NOBYTEALIGN |
  3154.           WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
  3155.     BEGIN
  3156.       NOTEBOOK   IDC_NOTEBOOK, 20, 20, 200, 400, BKS_ROUNDEDTABS | WS_GROUP
  3157.     END
  3158.  
  3159.  
  3160. ΓòÉΓòÉΓòÉ 2.5.44. POINTER Statement ΓòÉΓòÉΓòÉ
  3161.  
  3162. Syntax: 
  3163.  
  3164.   POINTER pointer-id  [load-option]  [ mem-option] [codepage] filename
  3165.  
  3166. The POINTER statement defines a pointer resource for an application. A pointer 
  3167. resource, typically created by using the OS/2 Icon Editor, is a bit map 
  3168. defining the shape of the mouse pointer on the screen. The POINTER statement 
  3169. copies the pointer resource from the file specified in the filename field and 
  3170. adds it to the application's other resources.  A pointer resource can be loaded 
  3171. from the executable file when needed by using the WinLoadPointer function. 
  3172.  
  3173. You can provide any number of POINTER statements in a resource script file, but 
  3174. each statement must specify a unique pointer-id value. 
  3175.  
  3176.  pointer-id        Specifies the pointer-resource identifier.  This value must 
  3177.                    be an unsigned integer in the range of 1 through 65535, a 
  3178.                    simple expression that evaluates to a value in these ranges, 
  3179.                    or a character string. 
  3180.  load-option       Specifies when the system loads the resource from the 
  3181.                    executable file into memory.  This value must be one of the 
  3182.                    following: 
  3183.                    PRELOAD             System loads the resource when the 
  3184.                                        application starts. 
  3185.                    LOADONCALL          System loads the resource when the 
  3186.                                        application calls the WinLoadPointer 
  3187.                                        function.  This is the default option. 
  3188.  mem-option        Specifies how the system manages the resource when it is in 
  3189.                    memory.  This value must be one or more of the following: 
  3190.                    FIXED               System keeps the resource at a fixed 
  3191.                                        memory location. 
  3192.                    MOVEABLE            System moves the resource as necessary 
  3193.                                        to compact memory. 
  3194.                    DISCARDABLE         System discards the resource if it is no 
  3195.                                        longer needed. The default setting is 
  3196.                    MOVEABLE and DISCARDABLE. 
  3197.  codepage          Specifies a code page value.  See CODEPAGE Statement for a 
  3198.                    list of valid code pages. 
  3199.  filename          Specifies the name of the file containing the pointer 
  3200.                    resource. If the file is not in the current directory, 
  3201.                    filename must be preceded by a full path. 
  3202.  
  3203.  Example 
  3204.  
  3205.  This example defines a pointer whose pointer identifier is 10. The pointer 
  3206.  resource is copied from the file custom.cur. 
  3207.  
  3208.   POINTER 10 custom.cur
  3209.  
  3210.  
  3211. ΓòÉΓòÉΓòÉ 2.5.45. PRESPARAMS Statement ΓòÉΓòÉΓòÉ
  3212.  
  3213. Syntax: 
  3214.  
  3215.   PRESPARAMS presparam, value, presparam, value, ...
  3216.  
  3217. The PRESPARAMS statement defines presentation fields that customize a dialog 
  3218. box, menu, window, or control.  PRESPARAMS data is a series of types and 
  3219. values.  The window procedure of the dialog box, menu, window or control 
  3220. receives and processes this data when the item is created.  The data for custom 
  3221. controls can be in any format. 
  3222.  
  3223.  presparam   Specifies a presentation-field type. 
  3224.  value       Specifies the presentation-field value. 
  3225.  
  3226.  Comments 
  3227.  
  3228.  PRESPARAMS is often used to supply data to control the appearance of the 
  3229.  customized window when it is first created.  For example, the PRESPARAMS 
  3230.  statement may specify the colors to be used in the window. 
  3231.  
  3232.  Example 
  3233.  
  3234.  This example creates a menu resource with a menu identifier of 1. The 
  3235.  PRESPARAMS statement specifies that the following three menu items be 
  3236.  displayed in the 12-point Helvetica font. 
  3237.  
  3238.   MENU 1
  3239.   BEGIN
  3240.       PRESPARAMS PP_FONTNAMESIZE, "12.Helv"
  3241.       MENUITEM "New", 100
  3242.       MENUITEM "Open", 101
  3243.       MENUITEM "Save", 102
  3244.   END
  3245.  
  3246.  
  3247. ΓòÉΓòÉΓòÉ 2.5.46. PUSHBUTTON Statement ΓòÉΓòÉΓòÉ
  3248.  
  3249. Syntax: 
  3250.  
  3251.   PUSHBUTTON text, id, x, y, width, height[, style]
  3252.  
  3253. The PUSHBUTTON statement creates a pushbutton control.  The control is a 
  3254. round-cornered rectangle containing the given text.  The control sends a 
  3255. message to its parent whenever the user chooses the control. The PUSHBUTTON 
  3256. statement, which you can use only in a DIALOG or WINDOW statement, defines the 
  3257. text, identifier, dimensions, and attributes of a control window.  The 
  3258. predefined class for this control is WC_BUTTON. If you do not specify a style, 
  3259. the default style is BS_PUSHBUTTON and WS_TABSTOP. 
  3260.  
  3261.  text    Specifies text that is centered in the rectangular area of the 
  3262.          control.  This field must contain zero or more characters enclosed in 
  3263.          double quotation marks.  Character values must be in the range 1 
  3264.          through 255.  If a double quotation mark is required in the text, you 
  3265.          must include the double quotation mark twice.  A tilde ( ~ ) character 
  3266.          in the text indicates that the following character is used as a 
  3267.          mnemonic character for the control.  When the control is displayed, 
  3268.          the tilde is not shown, but the mnemonic character is underlined. The 
  3269.          user can choose the control by pressing the key corresponding to the 
  3270.          underlined mnemonic character. 
  3271.  id      Specifies the control identifier.  This value must be a signed integer 
  3272.          in the range -32768 through 32767, an unsigned integer in the range of 
  3273.          1 through 65535, or a simple expression that evaluates to a value in 
  3274.          these ranges. 
  3275.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  3276.          This value must be a signed integer in the range -32768 through 32767 
  3277.          or an expression consisting of integers and the addition (+) or 
  3278.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  3279.          units and is relative to the origin of the dialog box, window, or 
  3280.          control containing the specified control. 
  3281.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  3282.          This value must be a signed integer in the range -32768 through 32767 
  3283.          or an expression consisting of integers and the addition (+) or 
  3284.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  3285.          units and is relative to the origin of the dialog box, window, or 
  3286.          control containing the specified control. 
  3287.  width   Specifies the width of the control.  This value must be an integer in 
  3288.          the range 0 through 65535 or an expression consisting of integers and 
  3289.          the addition (+) or subtraction (-) operator.  The width is in 
  3290.          n-character units. 
  3291.  height  Specifies the height of the control.  This value must be an integer in 
  3292.          the range 0 through 65535 or an expression consisting of integers and 
  3293.          the addition (+) or subtraction (-) operator.  The height is in 
  3294.          1/8-character units. 
  3295.  style   Specifies the control styles.  This value can be a combination of the 
  3296.          styles specified for WC_BUTTON. You can use the bitwise OR (|) 
  3297.          operator to combine styles. 
  3298.  
  3299.  Example 
  3300.  
  3301.  This example creates a pushbutton control that is labeled "OK." 
  3302.  
  3303.   PUSHBUTTON "OK", 101, 10, 10, 100, 100
  3304.  
  3305.  
  3306. ΓòÉΓòÉΓòÉ 2.5.47. RADIOBUTTON Statement ΓòÉΓòÉΓòÉ
  3307.  
  3308. Syntax: 
  3309.  
  3310.   RADIOBUTTON text, id, x, y, width, height[, style]
  3311.  
  3312. The RADIOBUTTON statement creates a radio-button control.  The control is a 
  3313. small circle that has the given text displayed to its right.  The control 
  3314. highlights the circle and sends a message to its parent window when the user 
  3315. selects the button.  The control removes the highlight and sends a message when 
  3316. the button is next selected.  The RADIOBUTTON statement, which you can use only 
  3317. in a DIALOG or WINDOW statement, defines the text, identifier, dimensions, and 
  3318. attributes of a control window.  The predefined class for this control is 
  3319. WC_BUTTON.  If you do not specify a style, the default style is BS_RADIOBUTTON. 
  3320.  
  3321.  text    Specifies text that is displayed to the right of the control.  This 
  3322.          field must contain zero or more characters enclosed in double 
  3323.          quotation marks.  Character values must be in the range 1 through 255. 
  3324.          If a double quotation mark is required in the text, you must include 
  3325.          the double quotation mark twice.  A tilde ( ~ ) character in the text 
  3326.          indicates that the following character is used as a mnemonic character 
  3327.          for the control.  When the control is displayed, the tilde is not 
  3328.          shown, but the mnemonic character is underlined.  The user can choose 
  3329.          the control by pressing the key corresponding to the underlined 
  3330.          mnemonic character. 
  3331.  id      Specifies the control identifier.  This value must be a signed integer 
  3332.          in the range -32768 through 32767, an unsigned integer in the range of 
  3333.          1 through 65535, or a simple expression that evaluates to a value in 
  3334.          these ranges. 
  3335.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  3336.          This value must be a signed integer in the range -32768 through 32767 
  3337.          or an expression consisting of integers and the addition (+) or 
  3338.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  3339.          units and is relative to the origin of the dialog box, window, or 
  3340.          control containing the specified control. 
  3341.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  3342.          This value must be a signed integer in the range -32768 through 32767 
  3343.          or an expression consisting of integers and the addition (+) or 
  3344.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  3345.          units and is relative to the origin of the dialog box, window, or 
  3346.          control containing the specified control. 
  3347.  width   Specifies the width of the control.  This value must be an integer in 
  3348.          the range 0 through 65535 or an expression consisting of integers and 
  3349.          the addition (+) or subtraction (-) operator.  The width is in 
  3350.          n-character units. 
  3351.  height  Specifies the height of the control.  This value must be an integer in 
  3352.          the range 0 through 65535 or an expression consisting of integers and 
  3353.          the addition (+) or subtraction (-) operator.  The height is in 
  3354.          1/8-character units. 
  3355.  style   Specifies the control styles.  This value can be a combination of the 
  3356.          styles specified for WC_BUTTON. You can use the bitwise OR (|) 
  3357.          operator to combine styles. 
  3358.  
  3359.  Example 
  3360.  
  3361.  This example creates a radio-button control that is labeled "Italic." 
  3362.  
  3363.   RADIOBUTTON "Italic", 101, 10, 10, 24, 50
  3364.  
  3365.  
  3366. ΓòÉΓòÉΓòÉ 2.5.48. RCDATA Statement ΓòÉΓòÉΓòÉ
  3367.  
  3368. Syntax: 
  3369.  
  3370.   RCDATA resource-id
  3371.   BEGIN
  3372.   data-definition, data-definition   ...
  3373.       .
  3374.       .
  3375.       .
  3376.   END
  3377.  
  3378. The RCDATA statement defines a custom-data resource for an application.  The 
  3379. custom data can be in whatever format the application requires.  You can 
  3380. provide any number of RCDATA statements in a resource script file, but each 
  3381. statement must specify a unique resource-id value.  A custom-data resource can 
  3382. be loaded from the executable file when needed by using the DosGetResource or 
  3383. DosGetResource2 functions with the RT_RCDATA resource type. 
  3384.  
  3385.  resource-id       Specifies the custom-data identifier.  This value must be an 
  3386.                    unsigned integer in the range of 1 through 65535, a simple 
  3387.                    expression that evaluates to a value in these ranges, or a 
  3388.                    character string. 
  3389.  data-definition   Specifies the custom data.  The data may be simple 
  3390.                    expressions or strings. 
  3391.  
  3392.  Example 
  3393.  
  3394.  This example defines custom data that has a resource identifier of 5. 
  3395.  
  3396.   RCDATA 5
  3397.   BEGIN
  3398.       "E. A. Poe", 1849, -32, 3L, 0x8000000l, 3+4+5
  3399.   END
  3400.  
  3401.  
  3402. ΓòÉΓòÉΓòÉ 2.5.49. RCINCLUDE Statement ΓòÉΓòÉΓòÉ
  3403.  
  3404. Syntax: 
  3405.  
  3406.   RCINCLUDE filename
  3407.  
  3408. The RCINCLUDE statement causes RC to process the resource script file specified 
  3409. in the filename field along with the current resource script file.  The 
  3410. contents of both files are compiled by RC and the results are placed in one 
  3411. binary resource file and/or executable file. 
  3412.  
  3413.  filename    Specifies the name of the resource script file to be included. If 
  3414.              the file is not in the current directory, filename must be 
  3415.              preceded by a full path. 
  3416.  
  3417.  Comments 
  3418.  
  3419.  RCINCLUDE statements are processed before any other processing is done, 
  3420.  including preprocessing by RCPP.EXE, which removes comments, replaces values 
  3421.  in the define directives, and so on. 
  3422.  
  3423.  When specifying a high performance file system (HPFS) file name on an 
  3424.  RCINCLUDE statement, enclose the path and file name in double quotes; for 
  3425.  example: 
  3426.  
  3427.      RCINCLUDE "d:\project\long dialog.dlg"
  3428.  
  3429.  Double quotes enables the Resource Compiler to recognize a name containing 
  3430.  embedded blank characters. 
  3431.  
  3432.  Example 
  3433.  
  3434.  This example includes the file DIALOGS.RC as part of the current resource 
  3435.  script file. 
  3436.  
  3437.   RCINCLUDE dialogs.rc
  3438.  
  3439.  
  3440. ΓòÉΓòÉΓòÉ 2.5.50. RESOURCE Statement ΓòÉΓòÉΓòÉ
  3441.  
  3442. Syntax: 
  3443.  
  3444.   RESOURCE type-id resource-id [load-option] [mem-option]
  3445.            [code-page] filename
  3446.  
  3447.   or
  3448.  
  3449.   RESOURCE type-id resource-id [load-option] [mem-option]
  3450.            [code-page]
  3451.   BEGIN
  3452.   data-definition [, data-definition]...
  3453.   ...
  3454.   END
  3455.  
  3456. The RESOURCE statement defines a custom resource for an application. A custom 
  3457. resource can be any data in any format. The RESOURCE statement copies the 
  3458. custom resource from the specified file or inline data, and adds it to the 
  3459. application's other resources. A custom resource can be loaded from the 
  3460. executable file when needed by using the DosGetResource or DosGetResource2 
  3461. function and specifying the resource's type and resource identifier. 
  3462.  
  3463. The custom resource data can be defined in a separate file or as inline data in 
  3464. the input script. This is reflected in the two formats that can be used for 
  3465. this statement. The first format is used when the custom resource data is being 
  3466. read from a file. The second format is used when the data consists of a block 
  3467. of raw source data that is defined inline in the input script. 
  3468.  
  3469. You can provide any number of RESOURCE statements in a resource script file, 
  3470. but each statement must specify a unique combination of type-id and resource-id 
  3471. values. That is, RESOURCE statements having the same type-id value are 
  3472. permitted as long as the resource-id value for each is unique. 
  3473.  
  3474.  type-id           Specifies the custom-resource type.  This value must be an 
  3475.                    integer in the range 256 through 65535, or a simple 
  3476.                    expression that evaluates to a value in that range.  (Values 
  3477.                    0 through 255 are reserved.) 
  3478.  resource-id       Specifies the custom-resource identifier.  This value must 
  3479.                    be a signed integer in the range -32768 through 32767, an 
  3480.                    unsigned integer in the range of 1 through 65535, a simple 
  3481.                    expression that evaluates to a value in these ranges, or a 
  3482.                    character string. 
  3483.  load-option       Specifies when the system loads the resource from the 
  3484.                    executable file into memory.  This value must be one of the 
  3485.                    following: 
  3486.                    PRELOAD             System loads the resource when the 
  3487.                                        application starts. 
  3488.                    LOADONCALL          System loads the resource when the 
  3489.                                        application calls the DosGetResource or 
  3490.                                        DosGetResource2 function.  This is the 
  3491.                                        default option. 
  3492.  mem-option        Specifies how the system manages the resource when it is in 
  3493.                    memory.  This value must be one or more of the following: 
  3494.                    FIXED               System keeps the resource at a fixed 
  3495.                                        memory location. 
  3496.                    MOVEABLE            System moves the resource as necessary 
  3497.                                        to compact memory. 
  3498.                    DISCARDABLE         System discards the resource if it is no 
  3499.                                        longer needed. The default setting is 
  3500.                    MOVEABLE and DISCARDABLE. 
  3501.  codepage          Specifies a code page value. See CODEPAGE Statement. for a 
  3502.                    list of valid code pages. 
  3503.  filename          Specifies the name of the file containing the custom 
  3504.                    resource. If the file is not in the current directory, 
  3505.                    filename must be preceded by a full path. 
  3506.  data-definition   Specifies a custom data definition.  The data can be a 
  3507.                    simple expression or a string.  Integers can be specified in 
  3508.                    decimal, octal, or hexadecimal format.  Data definitions in 
  3509.                    series on the same line are separated by commas.  An integer 
  3510.                    specified without the suffix L must be in the range -32768 
  3511.                    through 65535. An integer with an L suffix must be within 
  3512.                    the range -2147483648 through 4294967295.  String data is 
  3513.                    specified withing quotes. 
  3514.  
  3515.                    Note:  The Resouce Compiler does not append a null character 
  3516.                           to the end of these strings as it does for RCDATA 
  3517.                           blocks;  any required null characters must be written 
  3518.                           as \0 within the data string. 
  3519.  
  3520.  Example 
  3521.  
  3522.  This example defines a custom resource whose type identifier is 300 and whose 
  3523.  resource identifier is 14.  The custom resource is copied from the file 
  3524.  CUSTOM.RES. 
  3525.  
  3526.   RESOURCE 300 14 custom.res
  3527.  
  3528.  
  3529. ΓòÉΓòÉΓòÉ 2.5.51. RTEXT Statement ΓòÉΓòÉΓòÉ
  3530.  
  3531. Syntax: 
  3532.  
  3533.   RTEXT text, id, x, y, width, height[, style]
  3534.  
  3535. The RTEXT statement creates a right-aligned text control.  The control is a 
  3536. simple rectangle displaying the given text right-aligned in the rectangle.  The 
  3537. text is formatted before it is displayed.  Words that would extend past the end 
  3538. of a line are automatically wrapped to the beginning of the next line.  The 
  3539. RTEXT statement, which you can use only in a DIALOG or WINDOW statement, 
  3540. defines the text, identifier, dimensions, and attributes of the control.  The 
  3541. predefined class for the control is WC_STATIC.  If you do not specify a style, 
  3542. the default style is SS_TEXT, DT_RIGHT, and WS_GROUP. 
  3543.  
  3544.  text    Specifies text that is right-aligned in the rectangular area of the 
  3545.          control.  This field must contain zero or more characters enclosed in 
  3546.          double quotation marks.  Character values must be in the range 1 
  3547.          through 255.  If a double quotation mark is required in the text, you 
  3548.          must include the double quotation mark twice. 
  3549.  id      Specifies the control identifier.  This value must be a signed integer 
  3550.          in the range -32768 through 32767, an unsigned integer in the range of 
  3551.          1 through 65535, or a simple expression that evaluates to a value in 
  3552.          these ranges. 
  3553.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  3554.          This value must be a signed integer in the range -32768 through 32767 
  3555.          or an expression consisting of integers and the addition (+) or 
  3556.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  3557.          units and is relative to the origin of the dialog box, window, or 
  3558.          control containing the specified control. 
  3559.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  3560.          This value must be a signed integer in the range -32768 through 32767 
  3561.          or an expression consisting of integers and the addition (+) or 
  3562.          subtraction (-) operator.  The coordinate is assumed to be in dialog 
  3563.          units and is relative to the origin of the dialog box, window, or 
  3564.          control containing the specified control. 
  3565.  width   Specifies the width of the control.  This value must be an integer in 
  3566.          the range 0 through 65535 or an expression consisting of integers and 
  3567.          the addition (+) or subtraction (-) operator.  The width is in 
  3568.          n-character units. 
  3569.  height  Specifies the height of the control.  This value must be an integer in 
  3570.          the range 0 through 65535 or an expression consisting of integers and 
  3571.          the addition (+) or subtraction (-) operator.  The height is in 
  3572.          1/8-character units. 
  3573.  style   Specifies the control styles.  This value can be a combination of the 
  3574.          styles specified for WC_STATIC. You can use the bitwise OR (|) 
  3575.          operator to combine styles. 
  3576.  
  3577.  Example 
  3578.  
  3579.  This example creates a right-aligned text control that is labeled "Filename." 
  3580.  
  3581.   RTEXT "Filename", 101, 10, 10, 100, 100
  3582.  
  3583.  
  3584. ΓòÉΓòÉΓòÉ 2.5.52. SLIDER Statement ΓòÉΓòÉΓòÉ
  3585.  
  3586. Syntax: 
  3587.  
  3588.   SLIDER   id, x, y, width, height[, style]
  3589.  
  3590. The SLIDER statement creates a slider control within the dialog window.  This 
  3591. control lets the user set, display, or modify a value by moving a slider arm 
  3592. along a slider shaft.  The SLIDER statement defines the identifier, position, 
  3593. dimensions, and attributes of a slider control.  The predefined class for this 
  3594. control is WC_SLIDER.  If you do not specify a style, the default style is 
  3595. WS_TABSTOP and WS_VISIBLE. 
  3596.  
  3597.  id      Specifies the control identifier.  The value is a signed integer 
  3598.          -32768 through 32767, an unsigned integer in the range of 1 through 
  3599.          65535, or a simple expression that evaluates to a value in these 
  3600.          ranges. 
  3601.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  3602.          The value is a signed integer -32768 through 32767 or an expression 
  3603.          consisting of integers and the addition (+) or subtraction (-) 
  3604.          operator.  The coordinate is assumed to be in dialog units and is 
  3605.          relative to the origin of the dialog window. 
  3606.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  3607.          The value is a signed integer -32768 through 32767 or an expression 
  3608.          consisting of integers and the addition (+) or subtraction (-) 
  3609.          operator.  The coordinate is assumed to be in dialog units and is 
  3610.          relative to the origin of the dialog window. 
  3611.  width   Specifies the width of the control.  The value is any integer 0 
  3612.          through 65535 or an expression consisting of integers and the addition 
  3613.          (+) or subtraction (-) operator. The width is in n-character units. 
  3614.  height  Specifies the height of the control.  The value is any integer 0 
  3615.          through 65535 or an expression consisting of integers and the addition 
  3616.          (+) or subtraction (-) operator. The height is in 1/8-character units. 
  3617.  style   Specifies the control styles.  The value can be any combination of the 
  3618.          styles specified for WC_SLIDER.  You can use the bitwise OR ( | ) 
  3619.          operator to combine styles. 
  3620.  
  3621.  Comments 
  3622.  
  3623.  The SLIDER statement is only used in a DIALOG or WINDOW statement. 
  3624.  
  3625.  Example 
  3626.  
  3627.  This example creates a slider control at position (40, 30) within the dialog 
  3628.  window.  The slider has a width of 120 character units and a height of 2 
  3629.  character units.  Its resource identifier is 101. The style specification 
  3630.  SLS_BUTTONSLEFT adds buttons to the left of the slider shaft.  The default 
  3631.  styles WS_TABSTOP and WS_VISIBLE are both in effect, though only the latter is 
  3632.  specified. 
  3633.  
  3634.   #define    IDC_SLIDER       101
  3635.   #define    IDD_SLIDERDLG    502
  3636.   DIALOG "Slider", IDD_SLIDERDLG, 11, 11, 200, 240, FS_NOBYTEALIGN |
  3637.           WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
  3638.     BEGIN
  3639.       SLIDER   IDC_SLIDER, 40, 30, 120, 16, SLS_BUTTONSLEFT | WS_VISIBLE
  3640.     END
  3641.  
  3642.  
  3643. ΓòÉΓòÉΓòÉ 2.5.53. SPINBUTTON Statement ΓòÉΓòÉΓòÉ
  3644.  
  3645. Syntax: 
  3646.  
  3647.   SPINBUTTON   id, x, y, width, height[, style]
  3648.  
  3649. The SPINBUTTON statement creates a spin button control within the dialog 
  3650. window.  This control gives the user quick access to a finite set of data.  The 
  3651. SPINBUTTON statement defines the identifier, position, dimensions, and 
  3652. attributes of a spin button control.  The predefined class for this control is 
  3653. WC_SPINBUTTON. If you do not specify a style, the default style is WS_TABSTOP, 
  3654. WS_VISIBLE, and SPBS_MASTER. 
  3655.  
  3656.  id      Specifies the control identifier.  The value is a signed integer 
  3657.          -32768 through 32767, an unsigned integer in the range of 1 through 
  3658.          65535, or a simple expression that evaluates to a value in these 
  3659.          ranges. 
  3660.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  3661.          The value is a signed integer -32768 through 32767 or an expression 
  3662.          consisting of integers and the addition (+) or subtraction (-) 
  3663.          operator.  The coordinate is assumed to be in dialog units and is 
  3664.          relative to the origin of the dialog window. 
  3665.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  3666.          The value is a signed integer -32768 through 32767 or an expression 
  3667.          consisting of integers and the addition (+) or subtraction (-) 
  3668.          operator.  The coordinate is assumed to be in dialog units and is 
  3669.          relative to the origin of the dialog window. 
  3670.  width   Specifies the width of the control.  The value is any integer 0 
  3671.          through 65535 or an expression consisting of integers and the addition 
  3672.          (+) or subtraction (-) operator. The width is in n-character units. 
  3673.  height  Specifies the height of the control.  The value is any integer 0 
  3674.          through 65535 or an expression consisting of integers and the addition 
  3675.          (+) or subtraction (-) operator. The height is in 1/8-character units. 
  3676.  style   Specifies the control styles.  The value is any combination of the 
  3677.          styles specified for WC_SPINBUTTON.  You can use the bitwise OR ( | ) 
  3678.          operator to combine styles. 
  3679.  
  3680.  Comments 
  3681.  
  3682.  The SPINBUTTON statement is used only in a DIALOG or WINDOW statement. 
  3683.  
  3684.  Example 
  3685.  
  3686.  This example creates a spin-button control at position (80, 20) within the 
  3687.  dialog window.  The spin button has a width of 60 character units and a height 
  3688.  of 3 character units.  Its resource identifier is 302. The style specification 
  3689.  SPBS_NUMERICONLY creates a control which accepts only the digits 0-9 and 
  3690.  virtual keys.  The default styles SPBS_MASTER, WS_TABSTOP, and WS_VISIBLE are 
  3691.  all in effect, though only WS_TABSTOP is specified. 
  3692.  
  3693.   #define    IDC_SPINBUTTON   302
  3694.   #define    IDD_SPINDLG    502
  3695.   DIALOG "Spin button", IDD_SPINDLG, 11, 11, 200, 240, FS_NOBYTEALIGN |
  3696.           WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
  3697.     BEGIN
  3698.       SPINBUTTON  IDC_SPINBUTTON, 80, 20, 60, 24, SPBS_NUMERICONLY | WS_TABSTOP
  3699.     END
  3700.  
  3701.  
  3702. ΓòÉΓòÉΓòÉ 2.5.54. STRINGTABLE Statement ΓòÉΓòÉΓòÉ
  3703.  
  3704. Syntax: 
  3705.  
  3706.   STRINGTABLE  [load-option] [mem-option] [codepage]
  3707.   BEGIN
  3708.   string-id string-definition
  3709.       .
  3710.       .
  3711.       .
  3712.   END
  3713.  
  3714. The STRINGTABLE statement creates one or more string resources for an 
  3715. application.  A string resource is a null-terminated character string that has 
  3716. a unique string identifier.  A string resource can be loaded from the 
  3717. executable file when needed by using the WinLoadString or with DosGetResource 
  3718. with the RT_STRING resource type. RT_STRING resources are bundled together in 
  3719. groups of 16, with any missing IDs replaced with zero length strings. Each 
  3720. group, or bundle, is assigned a unique sequential identifier. The resource 
  3721. string identifier is not necessarily the same as the identifier specified when 
  3722. using DosGetResource. The formula for calculating the identifier of the 
  3723. resource bundle, for use in DosGetResource, is as follows: 
  3724.  
  3725. bundle ID = (id / 16) +1
  3726. where id is the string ID assigned in the RC file. 
  3727.  
  3728. Thus, bundle 1 contains strings 0 to 15, bundle 2 contains strings 16 to 31, 
  3729. and so on. Once the address of the bundle has been returned by DosGetResource 
  3730. (using the calculated identifier), the buffer can be parsed to locate the 
  3731. particular string within the bundle. The number of the string is calculated by 
  3732. the formula: 
  3733.  
  3734. string = id % 16
  3735. (string = remainder for id/16). 
  3736.  
  3737. The buffer returned consists of the CodePage of the strings in the first 
  3738. USHORT, followed by the 16 strings in the bundle. The first BYTE of each string 
  3739. is the length of the string (including the null terminator), followed by the 
  3740. string and the terminator. A zero length string is represented by two bytes: 
  3741. 01 (string length) followed by the null terminator. 
  3742.  
  3743. You can provide any number of STRINGTABLE statements in a resource script file. 
  3744. The compiler treats all the strings from the various STRINGTABLE statements as 
  3745. if they belonged to a single statement.  This means that no two strings in a 
  3746. resource script file can have the same string identifier. 
  3747.  
  3748.  load-option    Specifies when the system loads the resource from the 
  3749.                 executable file into memory.  This value must be one of the 
  3750.                 following: 
  3751.  
  3752.                 PRELOAD             System loads the resource when the 
  3753.                                     application starts. 
  3754.                 LOADONCALL          System loads the resource when the 
  3755.                                     application calls the WinLoadString 
  3756.                                     function. This is the default option. 
  3757.  
  3758.  mem-option     Specifies how the system manages the resource when it is in 
  3759.                 memory.  This value must be one or more of the following: 
  3760.  
  3761.                 FIXED               System keeps the resource at a fixed memory 
  3762.                                     location. 
  3763.                 MOVEABLE            System moves the resource as necessary to 
  3764.                                     compact memory. 
  3765.                 DISCARDABLE         System discards the resource if it is no 
  3766.                                     longer needed. 
  3767.  
  3768.                 The default setting is MOVEABLE and DISCARDABLE. 
  3769.  
  3770.  code-page      Specifies a code page value.  See CODEPAGE Statement for a list 
  3771.                 of valid code page values. 
  3772.  
  3773.  string-id      Specifies the character-string identifier.  This value must be 
  3774.                 a signed integer in the range -32768 through 32767, an unsigned 
  3775.                 integer in the range of 1 through 65535, or a simple expression 
  3776.                 that evaluates to a value in these ranges.  The value can be 
  3777.                 specified in decimal or hexadecimal notation.  Each string 
  3778.                 identifier in a resource script file must be unique. 
  3779.  
  3780.  string-definition Specifies a character string.  This field must contain zero 
  3781.                 or more characters enclosed in double quotation marks. 
  3782.                 Character values must be in the range 1 through 255.  If a 
  3783.                 double quotation mark is required in the string, you must 
  3784.                 include the double quotation mark twice. 
  3785.  
  3786.  Comments 
  3787.  
  3788.  You can continue a string on multiple lines by terminating the line with a 
  3789.  backslash (\) or by terminating the line with a double quotation mark (") and 
  3790.  then starting the next line with a double quotation mark. 
  3791.  
  3792.  Example 
  3793.  
  3794.  This example creates two string resources whose string identifiers are 1 and 
  3795.  2. 
  3796.  
  3797.   #define IDS_HELLO    1
  3798.   #define IDS_GOODBYE  2
  3799.  
  3800.   STRINGTABLE
  3801.   BEGIN
  3802.       IDS_HELLO   "Hello"
  3803.       IDS_GOODBYE "Goodbye"
  3804.   END
  3805.  
  3806.  
  3807. ΓòÉΓòÉΓòÉ 2.5.55. SUBITEMSIZE Statement ΓòÉΓòÉΓòÉ
  3808.  
  3809. Syntax: 
  3810.  
  3811.   SUBITEMSIZE  size
  3812.  
  3813. The SUBITEMSIZE statement specifies the size, in words, of each help subitem in 
  3814. a help subtable.  The minimum size is two words, and each help subitem in a 
  3815. help subtable must be the same size.  When used, the SUBITEMSIZE statement must 
  3816. appear after the HELPSUBTABLE statement and before the BEGIN keyword. 
  3817.  
  3818. You do not need to use the SUBITEMSIZE statement if the help subitems are the 
  3819. default size (2). 
  3820.  
  3821.  size    Specifies the size of each help subitem.  This value must be an 
  3822.          integer. 
  3823.  
  3824.  Example 
  3825.  
  3826.  The SUBITEMSIZE statement in this example specifies that each HELPSUBITEM 
  3827.  statement contains three words. 
  3828.  
  3829.   HELPSUBTABLE 1
  3830.   SUBITEMSIZE 3
  3831.   BEGIN
  3832.       HELPSUBITEM IDCLD_FILEMENU, IDHP_FILEMENU, 5
  3833.       HELPSUBITEM IDCLD_HELPMENU, IDHP_HELPMENU, 6
  3834.   END
  3835.  
  3836.  
  3837. ΓòÉΓòÉΓòÉ 2.5.56. SUBMENU Statement ΓòÉΓòÉΓòÉ
  3838.  
  3839. Syntax: 
  3840.  
  3841.   SUBMENU text, submenu-id [, menuitem-style]
  3842.   BEGIN
  3843.   menuitem-definition
  3844.       .
  3845.       .
  3846.       .
  3847.   END
  3848.  
  3849. The SUBMENU statement creates a submenu for a given menu.  A submenu is a 
  3850. vertical list of menu items from which the user can choose a command. 
  3851.  
  3852. You can provide any number of SUBMENU statements in a MENU statement, but each 
  3853. SUBMENU statement must specify a unique submenu-id value. You can provide any 
  3854. number of menuitem-definition statements in the SUBMENU statement.  These 
  3855. define the menu items (commands) in the menu.  The order of the statements 
  3856. determines the order of the menu items. 
  3857.  
  3858.  text                  Specifies the text of the submenu.  This field must 
  3859.                        contain zero or more characters enclosed in double 
  3860.                        quotation marks.  Character values must be in the range 
  3861.                        1 through 255.  If a double quotation mark is required 
  3862.                        in the string, you must include the double quotation 
  3863.                        mark twice.  A tilde ( ~ ) character in the item name 
  3864.                        indicates that the following character is used as a 
  3865.                        mnemonic character for the item.  When the menu is 
  3866.                        displayed, the tilde is not shown, but the mnemonic 
  3867.                        character is underlined.  The user can choose the menu 
  3868.                        item by pressing the key corresponding to the underlined 
  3869.                        mnemonic character. 
  3870.  submenu-id            Specifies the submenu identifier. This value must be a 
  3871.                        signed integer in the range -32768 through 32767, an 
  3872.                        unsigned integer in the range of 1 through 65535, or a 
  3873.                        simple expression that evaluates to a value in these 
  3874.                        ranges. 
  3875.  menuitem-style        Specifies the submenu style. This value can be a 
  3876.                        combination of MIS_ values. For details on the MIS_ 
  3877.                        values, see MENUITEM Statement. 
  3878.  menuitem-definition   Specifies a PRESPARAMS or MENUITEM statement.  You can 
  3879.                        use the PRESPARAMS statement to control the appearance 
  3880.                        of a submenu, such as the font and the foreground and 
  3881.                        background colors.  If used, the PRESPARAMS statement 
  3882.                        must immediately follow the BEGIN keyword.  For details 
  3883.                        about the PRESPARAMS statement, see PRESPARAMS 
  3884.                        Statement. 
  3885.  
  3886.                        The MENUITEM statement defines an individual command in 
  3887.                        the given menu.  For details, see MENUITEM Statement. 
  3888.  
  3889.  Example 
  3890.  
  3891.  This example creates a submenu named Elements.  Its identifier is 2. The 
  3892.  submenu contains three menu items, which are created by using MENUITEM 
  3893.  statements. 
  3894.  
  3895.   SUBMENU "Elements", 2
  3896.   BEGIN
  3897.       MENUITEM "Oxygen", 200
  3898.       MENUITEM "Carbon", 201, , MIA_CHECKED
  3899.       MENUITEM "Hydrogen", 202
  3900.   END
  3901.  
  3902.  
  3903. ΓòÉΓòÉΓòÉ 2.5.57. undef Directive ΓòÉΓòÉΓòÉ
  3904.  
  3905. Syntax: 
  3906.  
  3907.   undef name
  3908.  
  3909. This directive removes the current definition of the specified name.  All 
  3910. subsequent occurrences of the name are processed without replacement. 
  3911.  
  3912.  name    Specifies the name to be removed.  This value is any combination of 
  3913.          letters, digits, and punctuation. 
  3914.  
  3915.  Example 
  3916.  
  3917.  This example removes the definitions for the names "nonzero" and "USERCLASS". 
  3918.  
  3919.   #undef     nonzero
  3920.   #undef     USERCLASS
  3921.  
  3922.  
  3923. ΓòÉΓòÉΓòÉ 2.5.58. VALUESET Statement ΓòÉΓòÉΓòÉ
  3924.  
  3925. Syntax: 
  3926.  
  3927.   VALUESET   id, x, y, width, height[, style]
  3928.  
  3929. The VALUESET statement creates a value set control within the dialog window. 
  3930. This control lets a user select one choice from a group of mutually exclusive 
  3931. choices.  The VALUESET statement defines the identifier, position, dimensions, 
  3932. and attributes of a value set control.  The predefined class for this control 
  3933. is WC_VALUESET.  If you do not specify a style, the default style is WS_TABSTOP 
  3934. and WS_VISIBLE. 
  3935.  
  3936.  id      Specifies the control identifier.  The value is a signed integer 
  3937.          -32768 through 32767, an unsigned integer in the range of 1 through 
  3938.          65535, or a simple expression that evaluates to a value in these 
  3939.          ranges. 
  3940.  x       Specifies the x-coordinate of the lower-left corner of the control. 
  3941.          The value is a signed integer -32768 through 32767 or an expression 
  3942.          consisting of integers and the addition (+) or subtraction (-) 
  3943.          operator.  The coordinate is assumed to be in dialog units and is 
  3944.          relative to the origin of the dialog window. 
  3945.  y       Specifies the y-coordinate of the lower-left corner of the control. 
  3946.          The value is a signed integer -32768 through 32767 or an expression 
  3947.          consisting of integers and the addition (+) or subtraction (-) 
  3948.          operator.  The coordinate is assumed to be in dialog units and is 
  3949.          relative to the origin of the dialog window. 
  3950.  width   Specifies the width of the control.  The value is any integer 0 
  3951.          through 65535 or an expression consisting of integers and the addition 
  3952.          (+) or subtraction (-) operator. The width is in n-character units. 
  3953.  height  Specifies the height of the control.  The value is any integer 0 
  3954.          through 65535 or an expression consisting of integers and the addition 
  3955.          (+) or subtraction (-) operator. The height is in 1/8-character units. 
  3956.  style   Specifies the control styles. The value is any combination of the 
  3957.          styles specified for WC_VALUESET. You can use the bitwise OR ( | ) 
  3958.          operator to combine styles. 
  3959.  
  3960.  Comments 
  3961.  
  3962.  The VALUESET statement is used only in a DIALOG or WINDOW statement. 
  3963.  
  3964.  Example 
  3965.  
  3966.  This example creates a value set control at position (40, 40) within the 
  3967.  dialog window.  The value set control has a width of 220 character and a 
  3968.  height of 20 character units.  Its resource identifier is 302.  The style 
  3969.  specification VS_ICON creates a control to show items in icon form.  The 
  3970.  default styles WS_TABSTOP and WS_VISIBLE are both in effect, though only 
  3971.  WS_TABSTOP is specified. 
  3972.  
  3973.   #define    IDC_VALUESET     302
  3974.   #define    IDD_VALUESETDLG  501
  3975.   DIALOG "Value set", IDD_VALUESETDLG, 11, 11, 260, 240, FS_NOBYTEALIGN |
  3976.           WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
  3977.     BEGIN
  3978.       VALUESET  IDC_VALUESET, 40, 40, 220, 160, VS_ICON | WS_TABSTOP
  3979.     END
  3980.  
  3981.  
  3982. ΓòÉΓòÉΓòÉ 2.5.59. WINDOW Statement ΓòÉΓòÉΓòÉ
  3983.  
  3984. Syntax: 
  3985.  
  3986.   WINDOW text, id, x, y, width, height, class[, style[, framectl]]
  3987.          data-definitions
  3988. [ BEGIN
  3989. control-definition
  3990.     .
  3991.     .
  3992.     .
  3993. END ]
  3994.  
  3995. The WINDOW statement creates a window of the specified class.  The statement 
  3996. defines the position and dimensions of the window relative to its parent 
  3997. window, as well as the window-box style.  The WINDOW statement is typically 
  3998. used in a WINDOWTEMPLATE or FRAME statement. 
  3999.  
  4000. Typically, only one WINDOW statement is used in a FRAME statement.  It defines 
  4001. the client window belonging to the corresponding frame window. The optional 
  4002. BEGIN and END keywords enclose any CONTROL statements that are given with the 
  4003. window.  CONTROL statements given in this manner represent child windows 
  4004. belonging to the window created by the WINDOW statement. 
  4005.  
  4006.  text              Specifies the window title if the style specifies a title 
  4007.                    bar. This field must contain zero or more characters 
  4008.                    enclosed in double quotation marks.  The character values 
  4009.                    must be in the range 1 through 255.  If a double quotation 
  4010.                    mark is required in the title, you must include the double 
  4011.                    quotation mark twice. 
  4012.  id                Specifies the window identifier.  This value must be a 
  4013.                    signed integer in the range -32768 through 32767, an 
  4014.                    unsigned integer in the range of 1 through 65535, or a 
  4015.                    simple expression that evaluates to a value in these ranges. 
  4016.  x                 Specifies the x-coordinate of the lower-left corner of the 
  4017.                    window. This value must be a signed integer in the range 
  4018.                    -32768 through 32767 or an expression consisting of integers 
  4019.                    and the addition (+) or subtraction (-) operator.  The value 
  4020.                    is in dialog units.  The position is relative to the origin 
  4021.                    of the parent window. 
  4022.  y                 Specifies the y-coordinate of the lower-left corner of the 
  4023.                    window. This value must be a signed integer in the range 
  4024.                    -32768 through 32767 or an expression consisting of integers 
  4025.                    and the addition (+) or subtraction (-) operator.  The value 
  4026.                    is in dialog units.  The position is relative to the origin 
  4027.                    of the parent window. 
  4028.  width             Specifies the width of the window.  This value must be an 
  4029.                    integer in the range 0 through 65535 or an expression 
  4030.                    consisting of integers and the addition (+) or subtraction 
  4031.                    (-) operator.  The value is in n-character units. 
  4032.  height            Specifies the height of the window.  This value must be an 
  4033.                    integer in the range 0 through 65535 or an expression 
  4034.                    consisting of integers and the addition (+) or subtraction 
  4035.                    (-) operator.  The value is in 1/8-character units. 
  4036.  class             Specifies the window class.  This value can be one of the 
  4037.                    control classes specified in the "Control Classes" table in 
  4038.                    the Presentation Manager Programmer Reference or the name of 
  4039.                    the window class, enclosed in double quotation marks. 
  4040.  style             Specifies the window style.  This value can be any of the 
  4041.                    window, dialog box, or frame styles specified. 
  4042.  framectl          Specifies the style of the frame controls belonging to the 
  4043.                    window.  This value can be a combination of the styles 
  4044.                    specified in the table, "Frame-Control Styles." You can use 
  4045.                    the bitwise OR (|) operator to combine styles. 
  4046.  data-definitions  Specifies a CTLDATA and/or PRESPARAMS statement. These 
  4047.                    statements define control and presentation data for the 
  4048.                    window. For more information, see CTLDATA Statement and 
  4049.                    PRESPARAMS Statement. 
  4050.  control-definition Specifies a CONTROL statement or any one of several 
  4051.                    predefined control statements. These statements define the 
  4052.                    style, position, and dimensions of controls in the window. 
  4053.  
  4054.  Comments 
  4055.  
  4056.  The WINDOW statement can actually contain any combination of CONTROL, DIALOG, 
  4057.  and WINDOW statements. Typically, a WINDOW statement contains one or no such 
  4058.  statements. 
  4059.  
  4060.  Example 
  4061.  
  4062.  This example creates a client window belonging to the frame window. The client 
  4063.  window belongs to the "MyClientClass" window class and has the standard window 
  4064.  identifier FID_CLIENT. 
  4065.  
  4066.   WINDOWTEMPLATE 1
  4067.   BEGIN
  4068.       FRAME "My Window", 1, 10, 10, 320, 130,
  4069.                0, FCF_STANDARD | FCF_VERTSCROLL
  4070.       BEGIN
  4071.           WINDOW "", FID_CLIENT, 0, 0, 0, 0, "MyClientClass"
  4072.       END
  4073.   END
  4074.  
  4075.  
  4076. ΓòÉΓòÉΓòÉ 2.5.60. WINDOWTEMPLATE Statement ΓòÉΓòÉΓòÉ
  4077.  
  4078. Syntax: 
  4079.  
  4080.   WINDOWTEMPLATE window-id [load-option] [mem-option] [code-page]
  4081.   BEGIN
  4082.   window-definition
  4083.       .
  4084.       .
  4085.       .
  4086.   END
  4087.  
  4088. The WINDOWTEMPLATE statement creates a window template.  A window template 
  4089. consists of a series of statements that define the window identifier, load and 
  4090. memory options, window dimensions, and controls in the window.  The window 
  4091. template can be loaded from the executable file by using the WinLoadDlg 
  4092. function. 
  4093.  
  4094. You can provide any number of window templates in a resource script file, but 
  4095. each template must have a unique window-id value. 
  4096.  
  4097.  window-id           Specifies the window identifier.  This value must be a 
  4098.                      signed integer in the range -32768 through 32767, an 
  4099.                      unsigned integer in the range of 1 through 65535, a simple 
  4100.                      expression that evaluates to a value in these ranges, or a 
  4101.                      character string. 
  4102.  load-option         Specifies when the system loads the resource from the 
  4103.                      executable file into memory.  This value must be one of 
  4104.                      the following: 
  4105.                      PRELOAD             System loads the resource when the 
  4106.                                          application starts. 
  4107.                      LOADONCALL          System loads the resource when the 
  4108.                                          application calls the WinLoadDlg 
  4109.                                          function. This is the default option. 
  4110.  mem-option          Specifies how the system manages the resource when it is 
  4111.                      in memory.  This value must be one or more of the 
  4112.                      following: 
  4113.                      FIXED               System keeps the resource at a fixed 
  4114.                                          memory location. 
  4115.                      MOVEABLE            System moves the resource as necessary 
  4116.                                          to compact memory. 
  4117.                      DISCARDABLE         System discards the resource if it is 
  4118.                                          no longer needed. The default setting 
  4119.                      is MOVEABLE and DISCARDABLE. 
  4120.  code-page           Specifies a code page value.  See CODEPAGE Statement for a 
  4121.                      list of valid code pages. 
  4122.  window-definition   Specifies a WINDOW statement.  The statement defines the 
  4123.                      dimensions and style of the given window.  For details 
  4124.                      about the statement, see WINDOW Statement. 
  4125.  
  4126.  Comments 
  4127.  
  4128.  A WINDOWTEMPLATE statement can contain DIALOG, CONTROL, and WINDOW statements. 
  4129.  Typically, only one WINDOW statement is used in the WINDOWTEMPLATE statement. 
  4130.  
  4131.  
  4132. ΓòÉΓòÉΓòÉ 2.6. Resource Compiler Error Messages ΓòÉΓòÉΓòÉ
  4133.  
  4134. The error messages produced by the resource compiler utility (RC) and its 
  4135. preprocessor are listed below. 
  4136.  
  4137. RC Preprocessor Fatal Error Messages 
  4138.  
  4139. Error Message Descriptions 
  4140.  
  4141.  C1012 
  4142.            bad parenthesis nesting - missing symbol 
  4143.            Explanation: You wrote an expression which was missing the given 
  4144.            left or right parenthesis symbol. 
  4145.            Action: Rewrite the expression with balanced parentheses. 
  4146.  C1014 
  4147.            too many include files 
  4148.            Explanation: You might have tried to include a file recursively. 
  4149.            Action: Remove the include directive for any file which has already 
  4150.            been included to the preprocessor. 
  4151.  C1015 
  4152.            cannot open include file 'filename' 
  4153.            Explanation: The preprocessor could not locate the given include 
  4154.            file. 
  4155.            Action: If the include file is not in the current directory or in a 
  4156.            directory named in the INCLUDE environment variable, or in a 
  4157.            directory specified by a -i option, you must provide the full path 
  4158.            and include file name. 
  4159.  C1016 
  4160.            #if[n]def expected an identifier 
  4161.            Explanation:You wrote an ifdef or ifndef directive with no macro 
  4162.            name. 
  4163.            Action: Supply the missing name. 
  4164.  C1017 
  4165.            invalid integer constant expression 
  4166.            Explanation: You used an incorrect expression where an integer 
  4167.            constant was expected. 
  4168.            Action: Supply a correct expression to the directive. 
  4169.  C1018 
  4170.            unexpected #elif 
  4171.            Explanation: You used a directive in an incorrect context. 
  4172.            Action: Correct the logic of the if directives. 
  4173.  C1019 
  4174.            unexpected #else 
  4175.            Explanation: You used a directive in an incorrect context. 
  4176.            Action: Correct the logic of the if directives. 
  4177.  C1020 
  4178.            unexpected #endif 
  4179.            Explanation: You used a directive in an incorrect context. 
  4180.            Action: Correct the logic of the if directives. 
  4181.  C1021 
  4182.            bad preprocessor command 'command' 
  4183.            Explanation: The given command is not a recognized directive.  You 
  4184.            might have misspelled the directive. 
  4185.            Action: Use the correct spelling for the directive. 
  4186.  C1022 
  4187.            expected #endif 
  4188.            Explanation: You wrote an if directive but omitted any endif. 
  4189.            Action: Supply the missing endif directive. 
  4190.  C1056 
  4191.            compiler limit 'name' out of macro expansion space 
  4192.            Explanation: The macro called name expanded to a length exceeding 
  4193.            2042 bytes. 
  4194.            Action: Revise your definition of the macro so that its value is 
  4195.            shorter than the length limit. 
  4196.  C1065 
  4197.            compiler limit 'name' macro definition too big 
  4198.            Explanation: The macro called name expanded to a length exceeding 
  4199.            2042 bytes. 
  4200.            Action: Revise your definition of the macro so that its value is 
  4201.            shorter than the length limit. 
  4202.  
  4203.            Resource Compiler Preprocessor Error Messages 
  4204.  C2001 
  4205.            newline in constant 
  4206.            Explanation: You wrote a string literal constant without the closing 
  4207.            double quotation mark. 
  4208.            Action: Provide the ending double quote for the string. 
  4209.  C2004 
  4210.            expected defined(id) 
  4211.            Explanation: You wrote an if defined directive but omitted the macro 
  4212.            name. 
  4213.            Action: Supply the missing macro name. 
  4214.  C2006 
  4215.            #include expected a file name,found text 
  4216.            Explanation: The preprocessor found the given text instead of an 
  4217.            include file name. 
  4218.            Action Supply the correct include file name. 
  4219.  C2007 
  4220.            #define syntax 
  4221.            Explanation: The syntax of your define directive is incorrect. 
  4222.            Action: Use the correct form as described for the define directive. 
  4223.  C2014 
  4224.            preprocessor command must start as first non-white space 
  4225.            Explanation: You wrote a directive with text on the line before the 
  4226.            number sign (#). 
  4227.            Action: Put the number sign at the beginning of a line. 
  4228.  
  4229.            RC Preprocessor warnings 
  4230.  C4005 
  4231.            name redefinition 
  4232.            Explanation: You attempted to redefine the macro name to a value 
  4233.            different from its current definition. 
  4234.            Action: To use a different macro value, define it as a macro using 
  4235.            another macro name. 
  4236.  C4067 
  4237.            unexpected characters following include directive -newline expected 
  4238.            Explanation: You specified a filename to an include directive 
  4239.            without surrounding the name by double quotation marks or angle 
  4240.            brackets. 
  4241.            Action: Use double quotation marks or angle brackets around the 
  4242.            include filename. 
  4243.  C4067 
  4244.            unexpected characters following 'endif' directive - newline expected 
  4245.            Explanation: No characters should appear on the line of an endif or 
  4246.            else directive after the directive keyword. 
  4247.            Action: Remove the extra characters. 
  4248.  C4067 
  4249.            unexpected characters following 'else' directive-newline expected. 
  4250.            Explanation: No characters should appear on the line of an endif or 
  4251.            else directive after the directive keyword. 
  4252.            Action: Remove the extra characters. 
  4253.  C4067 
  4254.            unexpected characters following 'undef' directive - newline expected 
  4255.            Explanation: You can undefine only one macro on an undef directive. 
  4256.            Action:Use separate undef directive to undefine more than one macro. 
  4257.  
  4258.  Accelerator type required (CHAR, SCANCODE, or VIRTUALKEY) 
  4259.            Explanation: An acceloption has not been specified in the 
  4260.            accelerator table to define the type of accelerator. If the 
  4261.            accelerator character code is something other than a single 
  4262.            character or a character preceded by a caret ( ^ ), an acceloption 
  4263.            is required. 
  4264.            Action: Check accelerator table syntax. 
  4265.  BEGIN expected in accelerator table 
  4266.            Explanation: BEGIN keyword missing from accelerator table. 
  4267.            Action: Check syntax. 
  4268.  BEGIN expected in dialog or window template 
  4269.            Explanation: BEGIN keyword missing from dialog or window template. 
  4270.            Action: Check syntax. 
  4271.  BEGIN expected in menu 
  4272.            Explanation: BEGIN keyword missing from menu. 
  4273.            Action: Check syntax. 
  4274.  BEGIN expected in message table 
  4275.            Explanation: BEGIN keyword missing from message table. 
  4276.            Action: Check syntax. 
  4277.  BEGIN expected in RCData 
  4278.            Explanation: BEGIN keyword missing from RCData table. 
  4279.            Action: Check syntax. 
  4280.  BEGIN expected in String Table 
  4281.            Explanation: BEGIN keyword missing from string table. 
  4282.            Action: Check syntax. 
  4283.  Cannot re-use message constants 
  4284.            Explanation: Message identifier has been used more than once in 
  4285.            message table. 
  4286.            Action: Check message table syntax. 
  4287.  Cannot re-use string constants 
  4288.            Explanation: Message identifier has been used more than once in 
  4289.            string table. 
  4290.            Action: Check string table syntax. 
  4291.  Comma expected after item string 
  4292.            Explanation: A comma must be used to separate the menu item 
  4293.            identifier and the menu item string. 
  4294.            Action: Check menu syntax. 
  4295.  Control character out of range ( ^A - ^Z) 
  4296.            Explanation: Accelerator character codes that use the Ctrl key, and 
  4297.            are therefore preceded by a caret ( ^ ), must use alphabetic keys. 
  4298.            Action: Check accelerator table syntax. 
  4299.  END expected in dialog 
  4300.            Explanation: END keyword missing from dialog template. 
  4301.            Action: Check syntax. 
  4302.  END expected in menu 
  4303.            Explanation: END keyword missing from menu. 
  4304.            Action: Check syntax. 
  4305.  Error creating temp file 
  4306.            Explanation: Temporary files are created by the resource compiler 
  4307.            during the compilation process. 
  4308.            Action: Check that there is sufficient disk space to run the 
  4309.            resource compiler, and restart the resource compiler. 
  4310.  Expected comma in accelerator table 
  4311.            Explanation: Commas are used in the accelerator table to separate 
  4312.            the accelerator key, the accelerator command, and the accelerator 
  4313.            options. 
  4314.            Action: Check accelerator table syntax. 
  4315.  Expected ID value for menu item 
  4316.            Explanation: A selection identifier is needed for each item within a 
  4317.            menu. 
  4318.            Action: Check menu syntax. 
  4319.  Expected menu string 
  4320.            Explanation: A character string should be specified in the menu 
  4321.            definition to describe the menu selection. 
  4322.            Action: Check menu syntax. The string should be enclosed in double 
  4323.            quotation marks. 
  4324.  Expected numeric command value 
  4325.            Explanation: A number should be used in the accelerator table to 
  4326.            identify the message that is generated by an accelerator key. 
  4327.            Action: Check accelerator table syntax. 
  4328.  Expected numeric constant in message table 
  4329.            Explanation: The identifier that precedes a message definition must 
  4330.            be an integer. 
  4331.            Action: Check message definition syntax. 
  4332.  Expected numeric constant in string table 
  4333.            Explanation: The identifier that precedes a string definition must 
  4334.            be an integer. 
  4335.            Action: Check string definition syntax. 
  4336.  Expected numerical dialog constant 
  4337.            Explanation: Integers are required in dialog and window templates to 
  4338.            specify the coordinates and dimensions of the dialog box. 
  4339.            Action: Check syntax of dialog box definition. 
  4340.  Expected string in message table 
  4341.            Explanation: A character string was not found in the message table. 
  4342.            Action: Check syntax. The string should be enclosed in double 
  4343.            quotation marks. 
  4344.  Expected string in string table 
  4345.            Explanation: A character string was not found in the string table. 
  4346.            Action: Check string table syntax. The string should be enclosed in 
  4347.            double quotation marks. 
  4348.  Expected string or constant accelerator command 
  4349.            Explanation: The accelerator character code is missing. 
  4350.            Action: Check accelerator table syntax. 
  4351.  File not found 
  4352.            Explanation: The resource compiler could not find the .RC or .RES 
  4353.            file that you requested. 
  4354.            Action: Check that the file is in the current directory and check 
  4355.            the path to the directory. 
  4356.  Illegal empty BEGIN/END block found, resource not written 
  4357.            Explanation: A BEGIN/END block with no DIALOG, CONTROL, or WINDOW 
  4358.            statements in it was found in the dialog template. 
  4359.            Action: Delete unwanted BEGIN/END blocks. 
  4360.  Invalid accelerator 
  4361.            Explanation: The character code specified as an accelerator key must 
  4362.            be a valid keyboard operation. 
  4363.            Action: Check accelerator key definition syntax. 
  4364.  Invalid accelerator option 
  4365.            Explanation: The accelerator option must be a valid keyword. 
  4366.            Action: Check syntax. 
  4367.  Invalid control character 
  4368.            Explanation: The accelerator key definition can include a caret 
  4369.            ( ^) to specify that the key should be used with the Ctrl key. 
  4370.            Action: Check accelerator key definition syntax. 
  4371.  Invalid Type 
  4372.            Explanation: The resource type must be a valid keyword. 
  4373.            Action: Check resource definition syntax. 
  4374.  Non-numeric template ID in dialog or window template 
  4375.            Explanation: The resource identifier must be an integer. 
  4376.            Action: Check dialog or window template syntax. 
  4377.  Only one top level window allowed 
  4378.            Explanation: Only one DIALOG, CONTROL, or WINDOW statement is 
  4379.            allowed within the dialog or window template. 
  4380.            Action: Check dialog or window template syntax. 
  4381.  Resource Type keyword expected 
  4382.            Explanation: The resource type must be specified in the resource 
  4383.            script file. 
  4384.            Action: Check resource definition syntax. 
  4385.  String literal too long 
  4386.            Explanation: Strings cannot be longer than 255 characters. 
  4387.            Action: Edit the string. 
  4388.  Text string or ordinal expected in control 
  4389.            Explanation: A text string can be specified in the DIALOG statement 
  4390.            of a dialog template to give it a title.  If a title is not 
  4391.            required, double quotation marks must be used with no characters 
  4392.            between them (" "). 
  4393.            Action: Edit DIALOG statement. 
  4394.  Unbalanced parentheses 
  4395.            Explanation: The left and right parentheses have not been matched. 
  4396.            Action: Edit the parentheses. 
  4397.  Undefined keyword or key name 
  4398.            Explanation: An invalid keyword or key name has been used. 
  4399.            Action: Check syntax. 
  4400.  Unexpected end of file in string literal 
  4401.            Explanation: The double quotation marks have not been closed at the 
  4402.            end of a character string. 
  4403.            Action: Edit the string. 
  4404.  Unexpected value in RCData 
  4405.            Explanation: The variable defined in RCData must be a string or a 
  4406.            number. 
  4407.            Action: Check the RCData syntax. 
  4408.  Unknown dialog or window token 
  4409.            Explanation: The dialog and window templates must use only the 
  4410.            DIALOG, WINDOW, or CONTROL keywords. 
  4411.            Action: Check the dialog or window template syntax. 
  4412.  Unknown menu sub type 
  4413.            Explanation: Items within a menu can be specified only with the 
  4414.            MENUITEM and SUBMENU keywords. 
  4415.            Action: Check menu definition syntax. 
  4416.  
  4417.  
  4418. ΓòÉΓòÉΓòÉ 3. Notices ΓòÉΓòÉΓòÉ
  4419.  
  4420. May 1999 
  4421.  
  4422. The following paragraph does not apply to the United Kingdom or any country 
  4423. where such provisions are inconsistent with local law:  INTERNATIONAL BUSINESS 
  4424. MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY 
  4425. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
  4426. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states 
  4427. do not allow disclaimer of express or implied warranties in certain 
  4428. transactions, therefore, this statement may not apply to you. 
  4429.  
  4430. This publication could include technical inaccuracies or typographical errors. 
  4431. Changes are periodically made to the information herein; these changes will be 
  4432. incorporated in new editions of the publication. IBM may make improvements 
  4433. and/or changes in the product(s) and/or the program(s) described in this 
  4434. publication at any time. 
  4435.  
  4436. This publication was produced in the United States of America.  IBM may not 
  4437. offer the products, services, or features discussed in this document in other 
  4438. countries, and the information is subject to change without notice.  Consult 
  4439. your local IBM representative for information on the products, services, and 
  4440. features available in your area. 
  4441.  
  4442. Requests for technical information about IBM products should be made to your 
  4443. IBM reseller or IBM marketing representative. 
  4444.  
  4445.  
  4446. ΓòÉΓòÉΓòÉ 3.1. Copyright Notices ΓòÉΓòÉΓòÉ
  4447.  
  4448. (C) Copyright International Business Machines Corporation 1994, 1999. All 
  4449. rights reserved. 
  4450. Note to U.S. Government Users - Documentation related to restricted rights - 
  4451. Use, duplication or disclosure is subject to restrictions set forth in GSA ADP 
  4452. Schedule Contract with IBM Corp. 
  4453.  
  4454.  
  4455. ΓòÉΓòÉΓòÉ 3.2. Disclaimers ΓòÉΓòÉΓòÉ
  4456.  
  4457. References in this publication to IBM products, programs, or services do not 
  4458. imply that IBM intends to make these available in all countries in which IBM 
  4459. operates. Any reference to an IBM product, program, or service is not intended 
  4460. to state or imply that only that IBM product, program, or service may be used. 
  4461. Subject to IBM's valid intellectual property or other legally protectable 
  4462. rights, any functionally equivalent product, program, or service may be used 
  4463. instead of the IBM product, program, or service. The evaluation and 
  4464. verification of operation in conjunction with other products, except those 
  4465. expressly designated by IBM, are the responsibility of the user. 
  4466.  
  4467. IBM may have patents or pending patent applications covering subject matter in 
  4468. this document. The furnishing of this document does not give you any license to 
  4469. these patents. You can send license inquiries, in writing, to: 
  4470.  
  4471.       IBM Director of Licensing 
  4472.       IBM Corporation 
  4473.       500 Columbus Avenue 
  4474.       Thornwood, NY  10594 
  4475.       U.S.A. 
  4476.  
  4477.  Asia-Pacific users can inquire, in writing, to the IBM Director of 
  4478.  Intellectual Property and Licensing, IBM World Trade Asia Corporation, 2-31 
  4479.  Roppongi 3-chome, Minato-ku, Tokyo 106, Japan. 
  4480.  
  4481.  Licensees of this program who wish to have information about it for the 
  4482.  purpose of enabling: (i) the exchange of information between independently 
  4483.  created programs and other programs (including this one) and (ii) the mutual 
  4484.  use of the information which has been exchanged, should contact IBM 
  4485.  Corporation, Department LZKS, 11400 Burnet Road, Austin, TX 78758 U.S.A.  Such 
  4486.  information may be available, subject to appropriate terms and conditions, 
  4487.  including in some cases, payment of a fee. 
  4488.  
  4489.  
  4490. ΓòÉΓòÉΓòÉ 3.3. Trademarks ΓòÉΓòÉΓòÉ
  4491.  
  4492. The following terms are trademarks of the IBM Corporation in the United States 
  4493. or other countries or both: 
  4494.  
  4495.  AIX                           PowerPC 
  4496.  C Set ++                      Presentation Manager 
  4497.  Common User Access            SAA 
  4498.  CUA                           System Application Architecture 
  4499.  IBM                           WIN-OS/2 
  4500.  Operating System/2            Workplace Shell 
  4501.  OS/2                          XGA 
  4502.  Personal System/2 
  4503.  
  4504.  The following terms are trademarks of other companies: 
  4505.  
  4506.  CL, CL386                Microsoft Corporation 
  4507.  Intel                    Intel Corporation 
  4508.  MASM, MASM386            Microsoft Corporation 
  4509.  Pentium                  Intel Corporation 
  4510.  X/Open Company Ltd.      /X/Opend 
  4511.  
  4512.  Windows is a Trademark of the Microsoft Corporation. 
  4513.  
  4514.  Other company, product, and service names, which may be denoted by a double 
  4515.  asterisk (**), may be trademarks or service marks of others.