═══ 1. Notices ═══ First Edition (October 1994) The following paragraph does not apply to the United Kingdom or any country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This publication could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time. It is possible that this publication may contain reference to, or information about, IBM products (machines and programs), programming, or services that are not announced in your country. Such references or information must not be construed to mean that IBM intends to announce such IBM products, programming, or services in your country. Requests for technical information about IBM products should be made to your IBM authorized reseller or IBM marketing representative. ═══ 1.1. Copyright Notices ═══ COPYRIGHT LICENSE: This publication contains printed sample application programs in source language, which illustrate OS/2 programming techniques. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the OS/2 application programming interface. Each copy of any portion of these sample programs or any derivative work, which is distributed to others, must include a copyright notice as follows: "(C) (your company name) (year). All rights reserved." (C)Copyright International Business Machines Corporation 1994. All rights reserved. Note to U.S. Government Users - Documentation related to restricted rights - Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp. ═══ 1.2. Disclaimers ═══ References in this publication to IBM products, programs, or services do not imply that IBM intends to make these available in all countries in which IBM operates. Any reference to an IBM product, program or service is not intended to state or imply that only IBM's product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any of IBM's intellectual property rights or other legally protectable rights may be used instead of the IBM product, program, or service. Evaluation and verification of operation in conjunction with other products, programs, or services, except those expressly designated by IBM, are the user's responsibility. IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to the IBM Director of Licensing, IBM Corporation, 500 Columbus Avenue, Thornwood NY 10594, U.S.A. ═══ 1.3. Trademarks ═══ The following terms, denoted by an asterisk (*) in this publication, are trademarks of the IBM Corporation in the United States or other countries: IBM OS/2 Presentation Manager ═══ 2. About This Book ═══ The OS/2 Tools Reference is a detailed technical reference for tools in the OS/2 Toolkit. It is intended for use by application programmers creating programs using OS/2 system functions. ═══ 2.1. Double-Byte Character Set (DBCS) ═══ Throughout this publication, there are references to specific values for character strings. These values are for the Single-Byte Character Set (SBCS). When using the Double-Byte Character Set, notice that one DBCS character equals two SBCS characters. ═══ 2.2. Prerequisite Knowledge ═══ The OS/2 Tools Reference is intended for programmers knowledgeable in at least one programming language in which OS/2 programs can be written. ═══ 2.3. Organization of This Book ═══ o Introduction This chapter contains information about all chapters in the book and the function of the tools. o PACK and PACK2 This chapter describes the pack, unpack, pack2, and unpack2 tool, which reduces and expands the size of files. o Dialog Editor This chapter describes the Dialog Editor and how it is used to create and modify dialog boxes. o Executable File Header Utility (EXEHDR) This chapter describes the Executable File Header Utility (EXEHDR) that displays and modifies the contents of an executable-file header. o Font Editor This chapter describes the Font Editor and how it is used to define fonts and edit character width. o Forwarded Entry Point (FWDSTAMP) This chapter describes the FWDSTAMP, which adds entry points, called forwarders to a dynamic link library file. o Icon Editor This chapter describes the Icon Editor, which lets you create your own icons, pointers, and bit maps and save them for use by applications. o Link for Object and Library Files (LINK386) LINK386 is a tool used to combine object files and standard library files into a single file: an executable file, a dynamic-link library, or a device driver. o Make Message File (MKMSGF) This chapter describes the MKMSGF tool, which reads the input message file and creates an output message file. o MAP File to SYM File Creator (MAPSYM) This chapter describes MAPSYM, which is a program that creates .SYM files from .MAP files. o View and Set Program Type For Executable File (MARKEXE) This MARKEXE program enables you to view and set the program type for an executable file. o Message Segment Binder (MSGBIND) This chapter describes MSGBIND, which binds a message segment to an executable program. o Object Utility Description This chapter describes how Object Utility/2 provides a facility for registering Workplace Shell classes, creating instances of Workplace Shell classes, and modifying instances of Workplace Shell classes. o Program Maintenance Utility (NMAKE) This chapter describes how NMAKE automates the process of building an application from project files. o Quick Information (KwikINF) This chapter discusses KwikINF, a method of accessing information in online documents from anywhere on the desktop. o Resource Compiler This chapter describes the OS/2 Resource Compiler an application-development tool that lets you add application resources , such as message strings, pointers, menus, and dialog boxes, to the executable file of your application. o T Terminal Emulator This chapter discusses how the T Terminal Emulator communicates with the machine being debugged. o Workplace Class List This chapter discusses the Workplace Class List tool, which creates Workplace Shell object classes. ═══ 2.4. Related Publications ═══ The following diagram provides an overview of the OS/2 Warp, Version 3 Technical Library. Books can be ordered by calling toll free 1-800-342-6672 weekdays between 8:00 a.m. and 8:00 p.m. (EST). In Canada, call 1-800-465-4234. ═══ 3. Introduction ═══ The OS/2 Tools Reference is a technical reference for the OS/2* tools. The following is a brief description of each chapter in this book and the function of each tool. ═══ 3.1. Data Compression (PACK) PACK2 and UNPACK2 ═══ Purpose You can use PACK and UNPACK to compress and expand files. The options, parameters, and function for PACK2 are identical to PACK. Description Data Compression (PACK) is a tool that reduces the size of a file by compressing its data. Decompression (UNPACK) works in reverse and allows you to expand files. You can use PACK for a single file or group of files, thereby reducing the disk space required for your OS/2 application. The only difference between PACK and PACK2 is that PACK2 has a better compression algorithm. For more information see PACK and PACK2. ═══ 3.2. Dialog Editor ═══ Purpose The Dialog Editor draws dialog boxes and controls on the screen so you can see what they look like when used by your application. Description You can use the Dialog Editor to create and modify dialog box and modify the controls and text within dialog boxes. As you create the dialog box and its controls, you see them on the screen as the user sees them when using your program. You can place each dialog box and its controls where you want them on the screen. You also can test the dialog box before you incorporate it into your application. The Dialog Editor saves the dialog boxes in a ASCII-text format files that have .DLG extensions. For more information see Dialog Editor. ═══ 3.3. Executable File Header Utility (EXEHDR) ═══ Purpose The Executable File Header Utility (EXEHDR) displays and modifies the contents of an executable-file header. Description EXEHDR generates an output listing showing the contents of the file header and information about each object or segment in the file. Options are provided that let you change values in the file header. For more information see Executable File Header Utility (EXEHDR). ═══ 3.4. Font Editor ═══ Purpose Use the Font Editor to design and save fonts for use in your applications. Description The Font Editor enables you to edit an enlarged version of each character in an editing window, using the mouse to switch the enlarged representation of pels to black or white. A font is a set of alphanumeric characters, punctuation marks, and other symbols that share a common typeface design and line weight. An application loads a font from a dynamic-link library file (DLL file). For more information see Font Editor. ═══ 3.5. Forwarded Entry Point (FWDSTAMP) ═══ Purpose FWDSTAMP adds entry points, called forwarders, to a dynamic link library file. Description Forwarders point to API functions or other exported code or data. They contain and import reference so that the final target address of the forwarded entry is contained in a different module. A forwarder might be called an imported export. For more information see Forwarded Entry Point (FWDSTAMP). ═══ 3.6. Icon Editor ═══ Purpose The Icon Editor lets you create icons, pointers, and bit maps and save them for use by applications. Description You can customize Icons, pointers, and bit maps for your application. An application can use an icon to represent a minimized standard window. For example, for an application that lists telephone numbers you could create a telephone icon. For more information see Icon Editor. ═══ 3.7. Link for Object and Library Files (Link386) ═══ Purpose Link386 is used to combine object files and standard library files into a single file: an executable file, a dynamic-link library, or a device driver. Description LINK386 can produce dynamic-link libraries (.DLL) and device Drivers (.SYS), in addition to executable files (.EXE). For additional information, see Link for Object and Library Files (LINK386). ═══ 3.8. Make Message File (MKMSGF) ═══ Purpose There are two ways that the output message file can be used: o Selected messages can be bound to the message segment of an executable file using the MSGBIND program. o Messages can be accessed directly from the output message file. For more information see Make Message File (MKMSGF). Description The Make Message File (MKMSGF) program reads the input message file specified and creates an output message file that DosGetMessages uses to display messages. ═══ 3.9. MAP File to SYM File Creator (MAPSYM) ═══ Purpose MAP File to SYM File Creator (MAPSYM) is a program that creates .SYM files from .MAP files. Description .SYM files are used by the kernel debugger for symbolic debugging. MAPSYM must be run from the directory in which the file to be converted is located. For more information see MAP File to SYM File Creator (MAPSYM). ═══ 3.10. View and Set Program Type For Executable File (MARKEXE) ═══ Purpose The MARKEXE program enables you to view and set the program type for an executable file. Description Use MARKEXE with the OS/2 Linear Executable Linker (Link386) or the OS/2 Segmented Executable Linker (LINK) to change or set the program type of programs you have created. For more information see View and Set Program Type For Executable File (MARKEXE). ═══ 3.11. Message Segment Binder (MSGBIND) ═══ Purpose Message Segment Binder (MSGBIND) is a program that binds a message segment to an executable program. Description Message Segment Binder reads an input file that specifies the executable files to modify. For each executable file, MSGBIND specifies which message files to scan, and for each message file, it specifies which messages to include in the executable file. For more information see Message Segment Binder (MSGBIND). ═══ 3.12. Object Utility/2 ═══ Purpose Object Utility/2 provides a facility for registering Workplace Shell classes, creating instances of Workplace Shell classes, and modifying instances of Workplace Shell classes. Description The Object Utility/2 has attributes that can be set or modified. The attributes modify the behavior of the objects to enable or disable copying, deletion, and other attributes. For more information see Object Utility Description ═══ 3.13. Program Maintenance Utility (NMAKE) ═══ Purpose Program Maintenance Utility (NMAKE) automates the process of updating project files and can be used to make backups, configure data files, and run programs when data files are modified. Description Program Maintenance Utility (NMAKE) compares the modification dates for one set of files (the target files) with those of another set of files (the dependent files). If any dependent files have changed more recently than the target files, NMAKE executes a series of commands to bring the targets up-to-date. For more information see Program Maintenance Utility (NMAKE). ═══ 3.14. Quick Information (KwikINF) ═══ Purpose KwikINF provides you with a quick and convenient method of accessing information in online documents stored in the OS/2 BOOKSHELF from anywhere on the desktop, with the exception of DOS or WIN-OS/2* sessions. Description You can open a dialog with KwikINF by pressing a user-selectable hot key after starting KwikINF. The KwikINF window also allows you to initiate searches for text strings in on-line documents of your choice. For more information see Quick Information (KwikINF). ═══ 3.15. Resource Compiler ═══ Purpose The OS/2 Resource Compiler (RC) is an application-development tool that lets you add application resources, such as message strings, pointers, menus, and dialog boxes, to the executable file of your application. Description The Resource Compiler is primarily intended to prepare data for OS/2 applications that use functions such as WinLoadString, WinLoadPointer,WinLoad Menu, and WinLoadDlg. For more information see Resource Compiler. ═══ 3.16. T Terminal Emulator ═══ Purpose The T Terminal Emulator is used to communicate with the machine to be debugged or to send ASCII files. Description The Kernel Debugger uses the T Terminal Emulator to communicate with the machine to be debugged. You can also use T Terminal Emulator to send and receive ASCII files. For more information see T Terminal Emulator. ═══ 3.17. Workplace Class List ═══ Purpose Workplace Class List creates a workplace object class and an instance of a workplace object class. Description Workplace objects are constructed using the SOM protocol and are called Predefined, Subclass or Replaced object classes. For a definition of Predefined, Subclass and Replaced classes, see Workplace Class List. ═══ 4. PACK and PACK2 ═══ PACK reduces the size of a file by compressing its data. You can use PACK for a single file or for a group of files, thereby reducing the disk space required for your OS/2 application. The options, parameters, and function for PACK2 are identical to PACK. The only difference between PACK and PACK2 is that PACK2 has a better compression algorithm. ═══ 4.1. Starting PACK ═══ You start PACK with a single command from the command line. The input required can be specified in one of two ways: o You can type on the command line the names of all the files you want to compress (Method 1). See Starting PACK: Method 1. o You can type the name of a single file that contains a list of all the files you want to compress (Method 2). See Starting PACK: Method 2. When using PACK, select the method that is suitable for you. ═══ 4.1.1. Starting PACK: Method 1 ═══ You can start PACK with a single command from the command line. You can type the names of all the files you want to compress directly on the command line. Include the drive and path if the files are not in the working directory. You can specify file names with any combination of uppercase and lowercase letters. File-name extensions are not required; however, if you specify a file name that has an extension, also type the extension. The command-syntax is as follows: PACK sourcefile [packedfile] [/H:headerpath\ |/H:headerfile |/H:headerpath\ headerfile] [/D:headerdate] [/T:headertime] [/C] [/A] [/R] where: sourcefile Specifies the name of the file you want packed (compressed). This parameter is required. Include the drive and path if the file is not in the working directory. Global file-name characters are permitted. When the data is compressed, the name of the source file is placed in the header of the compressed file and is used as the destination file name during unpacking. packedfile Specifies the name of the file that will contain the compressed data. Files that contain compressed data can be recognized by the @ symbol as the last character in the file name. If you do not specify this parameter, PACK places the compressed data in sourcefile and modifies its name to contain the @ symbol. /H:headerpath\ or /H:headerfile or /H:headerpath\headerfile These parameters can be used separately or they can be paired. /H:headerpath\ Specifies the destination path to be placed in the header of the file that contains the compressed data. Drive letters are not permitted. Unless this path is overridden with the UNPACK command, it will be the destination path when the file is uncompressed. Headerpath must end with a back slash (\). /H:headerfile Specifies the name of the file to be placed in the header of the compressed file. This file name will be used as the destination file for the uncompressed data and cannot be overridden. If a header file name is not specified, PACK automatically uses sourcefile as the name of the file that is placed in the header of the compressed file. /H:headerpath\headerfile Specifies that both a destination path and a destination file name are to be placed in the header of the file that has the compressed data. /D:headerdate Records the date in the header of the file that has the compressed data, and also in the destination file when it is uncompressed. The date must follow the format /D:MM-DD-YYYY (for example: /D:08-20-1991 and /D:12-30-2010) /T:headertime Records the time in the header of the file that has the compressed data, and also in the destination file when it is uncompressed. The time must follow the format /T:HH.MM (for example /T:02.06 and /T:14.54). Hour 00 represents 12 a.m. and hour 12 represents 12 p.m. /C Specifies that the current path be placed in the header of the file that contains the compressed data. When the UNPACK command is used, this path will be the destination path for the file that contains the uncompressed data. You cannot use /C when the headerpath is used. /A Adds data from sourcefile to the data in packedfile. The source file can be either in a compressed or uncompressed state. If the source file is in an uncompressed state, the data is compressed before being added to the file containing the compressed data. /R Removes the file specified by sourcefile from the file that contains only compressed data. The sourcefile parameter must specify the path and file name exactly as they appear in the header of the file with the compressed data; otherwise, the following error message appears on the screen. The specified file to remove was not found. The /R parameter is valid only when used in conjunction with sourcefile and packedfile. Note: To display the path and file-name information stored in the header of the file that contains the compressed data, use the UNPACK command and specify the SHOW option. For information about the SHOW option, see the UNPACK command in the online OS/2 Command Reference. You can also get end-to-end compressed data by using global file-name characters. For example: PACK *.EXE BUNDLE ═══ 4.1.2. Starting PACK: Method 2 ═══ You can start PACK with a single command from the command line. You can type the name of a single file that contains a list of all the files you want to compress. Include the drive and path if the files are not in the working directory. You can specify file names with any combination of uppercase and lowercase letters. File-name extensions are not required; however, if you specify a file name that has an extension, also type the extension. The command-line syntax is as follows: PACK listfile [packedfile] /L [/H:headerpath\ |/H:headerfile |/H:headerpath\ headerfile] [/D:headerdate] [/T:headertime] [/C] where: listfile Specifies the name of the file that contains a list of files that are to be compressed. When naming a list file, do not use global file-name characters. For information about list files, see Creating a List File. packedfile Specifies the name of the file that will contain the compressed data. Files that contain compressed data can be recognized by the @ symbol as the last character in the file name. If you do not specify this parameter, PACK places the compressed data in sourcefile and modifies its name to contain the @ symbol. /L Indicates that filename is a list file. A list file is not compressed; it simply contains a listing of the names of the files that are to be compressed. /H:headerpath\ or /H:headerfile or /H:headerpath\ headerfile These parameters can be used separately or they can be paired. /H:headerpath\ Specifies the destination path (drive letters are not permitted) to be placed in the header of the file that contains the compressed data. Unless this path is overridden with the UNPACK command, it will be the destination path when the file is uncompressed. Headerpath must end with a back slash (\). /H:headerfile Specifies the name of the file to be placed in the header of the compressed file. This file name will be used as the destination file for the uncompressed data and cannot be overridden. If a header file name is not specified, PACK automatically uses sourcefile as the name of the file that is placed in the header of the compressed file. /H:headerpath\ headerfile Specifies that both a destination path and a destination file name are to be placed in the header of the file that has the compressed data. /D:headerdate Records the date in the header of the file that has the compressed data, and also in the destination file when it is uncompressed. The date must follow the format /D:MM-DD-YYYY. For example: /D:08-20-1991 and /D:12-30-2010. /T:headertime Records the time in the header of the file that has the compressed data, and also in the destination file when it is uncompressed. The time must follow the format /T:HH.MM. For example /T:02.06 and /T:14.54. Hour 00 represents 12 a.m. and hour 12 represents 12 p.m. /C Specifies that the current path be placed in the header of the file that contains the compressed data. When the UNPACK command is used, this path will be the destination path for the file that contains the uncompressed data. You cannot use /C when the headerpath is used. Note: The path and file-name information stored in the header of the file that contains the compressed data can be displayed by using the /SHOW option available with UNPACK. For information about the /SHOW option, see the UNPACK command in the on line OS/2 Command Reference. ═══ 4.2. Creating a List File ═══ To use a list file with PACK, you must first create a file that contains the names of the files you want to compress. You can give the list file any name. Following is an example of specifying a list file at the command line. PACK DEVICE.LST DEVICE.DRV /L The /L indicates that DEVICE.LST is a list file. If the list file is not in the working directory, you must specify the drive and path. Global file-name characters are not permitted in the list-file name. DEVICE.DRV is the destination file for the end-to-end-compressed data. (End-to-end compressed data is the data from each of the files contained in the list file. This data is stored in a contiguous format in the destination file.) The syntax used in the list file is similar to that used in the command line. The syntax for a single line in the list file follows: sourcefile [/H:headerpath\ |/H:headerfile |/H:headerpath\ headerfile] [/D:headerdate] [/T:headertime] [/C] When using the list-file method (method 2), global file-name characters are not permitted in the source-file name. Notice also that "PACK" is excluded and packedfile is not permitted in the list file, because they were specified on the command line. You can include comments or blank lines by entering a semicolon as the first character of the line. An example of a list file follows. ;This is a comment C:\OS2\COMMAND.COM CONFIG.SYS /H:CONFIG.BAK /C \OS2\INSTALL\DDINSTAL.EXE /H:\OS2\DDINSTAL.TMP /D:10-15-91 /T:11.45 ═══ 4.3. Starting UNPACK ═══ UNPACK restores a file of compressed data to its original size and copies it to a specified drive and path. To start the UNPACK command, type: UNPACK sourcefile [destinationdrive:] [destinationpath] [/SHOW] [/N:singlefile] [/V] [/F] where: sourcefile Specifies the name of an existing file that contains compressed data. If this file contains one or more files of compressed data, UNPACK restores each file within the file. destinationdrive: Specifies the name of the drive where you want UNPACK to copy one or more restored files. When you specify a destination drive but not a path, UNPACK uses the path information stored in the header of the file that contains the compressed data. destinationpath Specifies the name of the directory (and its subdirectories) where you want UNPACK to copy one or more restored files. When specified, the destination path overrides the path information stored in the header of the file that contains the compressed data. /SHOW Displays the destination path and file-name information that are saved in the header of each file containing compressed data. /N:singlefile Extracts and uncompresses one file from a file that contains multiple files of compressed data. /V Verifies that sectors written to the target disk are recorded properly. This parameter lets you know that critical data has been correctly recorded. This parameter causes UNPACK to run slower because a check is made for each entry recorded on the disk. /F Specifies that files with extended attributes should not be unpacked or copied if the destination file system does not support extended attributes. ═══ 5. Dialog Editor ═══ You use the Dialog Editor to create and modify dialog boxes, and to create and modify the controls and text within dialog boxes. As you create the dialog box and its controls, you see them on the screen as the user will see them when your program is run. You can place each dialog box and its controls where you want them on the screen. In addition, you can test the dialog box before you incorporate it into your application. Each dialog box and control can have either an integer identifier or a symbolic identifier that equates to an integer identifier. You use the identifier in your application to refer to the dialog box or control. If you intend to use symbolic identifiers in your application, you must enter the symbolic and integer identifiers in an include file. If you do not use symbolic names, the Dialog Editor supplies an integer identifier for each control and for the dialog box itself. You can use the Dialog Editor to create the include file, or you can use a text editor to create the include file before using the Dialog Editor. It is good programming practice to plan the resources that your application will use and to choose a naming and numbering convention for the symbolic or integer identifiers before you create them. Keep the include file separate from other include files used by your application. Include files used by the Dialog Editor can contain only #define statements that define their symbolic identifiers and equivalent integers. Although the Dialog Editor draws dialog boxes and controls on the screen so you can see what they look like when used by your application, it does not save them as graphics. Instead, the Dialog Editor saves them in an ASCII-text format file that has a .DLG extension. Refer to the dialog template section of this chapter. The Dialog Editor also creates a compiled form of the .DLG file in a resource file with a .RES extension. The .DLG and .RES files can contain more than one dialog box. The resource file can contain other application resources, such as icons, bit maps, and string tables. It is attached to the executable (.EXE) file of the application during the compile and link process. ═══ 5.1. Designing Dialog Boxes ═══ Dialog boxes should be designed to clearly identify the information that the user is required to complete. The following are a few Common User Access* guidelines: o Lay out the controls in columns, starting at the upper-left corner, for left-to-right or top-to-bottom scanning. o Vertically and horizontally align selection and entry fields so that the cursor moves in a straight line. o Arrange the controls in the sequence in which the user would complete them. o If there are only a few entry fields, locate them at the top of the dialog box. o Make groups of controls obvious by use of group boxes and white space. o Align group boxes, where possible. Group boxes can be extended to the right to line up with other group boxes. o Use field identifiers to identify the purpose of single and multiple groups of choices. ═══ 5.2. Creating a Dialog Box ═══ To run the Dialog Editor, select Dialog Editor from the Development Tools folder. The main window appears, displaying the menu bar choices File, Edit, Control, Arrange, Options, and Help. On line help that tells you how to use the editor is available on most Dialog Editor windows. To create a new dialog box, start with either one of the following steps: o Select New Dialog from the Edit menu. The editor opens new files with the extensions .RES and .DLG. This also opens a new include file. o Select New from the File menu. This opens new files with the extensions .RES and .DLG. You can open a new include file or an existing one. The above steps have the same effect. When you edit a dialog box, the names of the resource and include files are shown in the title bar of the Dialog Editor. If you are editing a new file that has not yet been named or saved, (Untitled) appears in the title bar in place of a name. If (Untitled) appears in the title bar in place of a name, there are unsaved changes. The Dialog Box ID field appears in the status area. A default integer number is supplied in the entry field. Type a symbolic identifier for the dialog box, such as MYDIALOG. Tab to the integer field and type the integer number. Press Enter to place them both in the include file. The new dialog box appears in the lower-left corner of the editor screen enclosed by a frame. The frame contains eight small squares called drag handles, which allow you to change the width and height of the selected item. This indicates that the dialog box is selected for editing. If you are creating a new dialog box, the dialog is automatically selected; at all other times, before you edit the dialog box or a control, you must click on it to select it. To continue creating the new dialog box, follow these steps: 1. Make the dialog box larger by clicking on one of its drag handles with the left mouse button and dragging until the box is the size you want it to be. This can be done in one operation by clicking on the upper-right corner of the frame and dragging diagonally upwards and to the right. Information about the item you are editing is displayed in the Selected Item Status box in the left half of the status area. As you move the shadow box, the x-y-coordinates change. These are the coordinates of the origin of the dialog box relative to the origin of the window. The cx-cy-coordinates are the width and height of the dialog box. The symbolic identifier is also shown. 2. Select Styles from the Edit menu. The Dialog Box Styles pop-up window appears. 3. Click on the text entry field in the status area, and then type the dialog box title (for instance, Sample dialog box) into the field. 4. Press Enter and the title appears at the top of your dialog box. You can reposition the entire dialog box by moving the pointer inside the top area enclosed by the frame, holding the left mouse button down, and dragging the shadow box across the screen. When the shadow box is in the position where you want the dialog box to appear, release the mouse button. The dialog box appears in that position. Alternatively, you can move the dialog box using the keyboard arrow keys. You can reposition the dialog box at any time during the edit. ═══ 5.2.1. Using a Grid ═══ Before you start adding controls to the dialog box, you might want to first select the grid option to make laying out your dialog easier. You can use a mouse to place controls in a dialog box and to move the controls in line with each other. However, you can more accurately position the controls by using the keyboard arrow keys or mouse after grid values have been set. The Settings-change dialog lets you set the number of character spaces (in dialog units) by which you can move dialog boxes and controls when using the Dialog Editor. To set the grid size, follow these steps: 1. Select Settings from the Arrange menu. The Settings-change dialog is displayed. The initial grid setting for both x and y is 1 unit. 2. Change the x-setting to 10 and the y-setting to 5. Click on OK. The horizontal (x) and vertical (y) values are in dialog units. A horizontal dialog unit is 0.25 of the standard character size. A vertical dialog unit is 0.125 of the standard character size. For example, if you move a control to the left or the right (using the mouse or keyboard arrow keys) with x set at 20, it moves in steps of twenty dialog units. When you subsequently position dialog boxes or controls, the objects move by the specified number of dialog units on an invisible grid. Large values make it easier to align controls, while small values allow you to position controls in the dialog box more precisely. Now that the grid is in place, you are ready to start adding controls. ═══ 5.2.2. Ordering Control Groups ═══ This option allows you to gather controls into groups and to change the order in which the tab keys and arrow keys move the selection cursor around the controls. When you use group boxes to group controls, always create the group box before the controls that are to go inside it. It is good practice to put group markers around all separate groups of controls, including putting a marker before the first control in the list. The list box shows the order in which the selection cursor moves between the controls when the user presses the arrow and tab keys. (The coordinate position of a control when displayed in the dialog box does not affect the order.) Initially, the controls are listed in the order in which they were created. There are three functions involved in grouping controls: o Setting Group Markers o Setting Tab Markers o Moving Control Order Setting Group Markers To set up groups in a dialog that has various types of controls, follow these steps: 1. Select Order Groups from the Arrange menu. The Groups - order dialog is displayed. 2. Click on the first radio button in the list box. 3. Click on the Group Marker push button. A group marker is now displayed between the Text control and the first radio button in the list. 4. Scroll down the list and click on the first push button in the list. Click on the Group Marker push button. This has organized your controls into groups of text, radio buttons, check boxes, and push buttons. Setting Tab Markers After setting group markers, you will want to set tab-stops. The controls marked with an asterisk already have tab-stops. To make the tab-stop at only the first control in each group, delete the tab-stops from the second and third radio button and check box, following these steps: 1. Click on the second radio button in the list to mark it. 2. Click on the Delete Tab push button. 3. Repeat the above steps for the third radio button, and then perform the same operation for the second and third check box in the list. When this is complete, press Enter. Moving Control Order You can move controls in the list and then see during testing how the changes affect the movement of the cursor. To change the position of a control in the list, follow these steps: 1. Click on the name of the control to select it. 2. Position the pointer in the list where you want the name to appear. The pointer changes shape to a short horizontal line when it is over a place where you can insert the name. 3. To insert the control name, click the mouse button. After grouping controls, you might want to test or edit the dialog, or enter additional controls. ═══ 5.2.3. Adding Controls ═══ The control menu lists, in alphabetic order, all the controls that you can put in a dialog box. To add controls, follow these steps: 1. Select a control from the Control menu or click on an icon on the Control Palette at the right side of the window. The pointer becomes a small plus sign (+) in a square. The center marks the position where the lower-left corner of the frame for the control will be set. 2. Click the mouse to position the control. 3. A dialog might appear (depending on the type of control) in which you must enter data or check preferences to define the control. Complete this and close the dialog. For an example of adding controls in a typical dialog, see Adding Controls Example. You might want to test the dialog. For detailed descriptions of individual controls and how they work, see the individual controls in the on line help (while using the Dialog Editor) by following these steps: 1. Select Help Index from the Help menu (or press F1 and select Help Index). 2. Select Options or press Alt-O. 3. Select Contents or press Ctrl-C. 4. Select Control Menu for an alphabetic list of controls, or select Control Palette for the icons as they appear on the Control Palette. 5. Select the control you want to read about. ═══ 5.2.4. Adding Controls Example ═══ The control menu lists, in alphabetic order, all the controls that you can put in a dialog box. The sample dialog is Sample Dialog Template File. To add controls for a sample dialog, follow these steps: 1. Select Text from the Control menu or select a control by clicking on its icon on the Control Palette at the right side of the window. The pointer becomes a small plus sign (+) in a square. The center marks the position where the center of the control will be. 2. Position the pointer inside the dialog box near the upper-left corner and click the mouse. 3. Type Student Level: in the Text entry field. Observe that the next sequential integer is supplied in the Symbol entry field. Press Enter. 4. Replace the symbol with ID_GRAD and press Enter. The Dialog editor assigns the next integer to the symbolic identifier you entered and places it in the include file. This is another technique for entering symbolic identifiers. 5. To view or change the include file at any time, select Symbols from the Edit menu. The Symbols dialog appears. The symbolic and integer identifier for the dialog box and the text control are displayed in the list box. The dialog allows you to add, delete, and change the identifiers and to view the hexadecimal equivalents of the integers. 6. Select the OK push button to remove the dialog and register any changes. Select Cancel if you have not made any changes. 7. In your dialog box, the static control is not large enough for you to see all the text. To remedy this, click on the text, and a frame appears around it. Drag the right-hand edge of the frame to the right to enlarge the field. When you release the mouse button, you should be able to see all the tex. When a control has a frame around it, it is selected and you can use a shadow box to position it, as you did with the dialog box. 8. To add another control, select Radio Button from the Control menu and position the cursor just beneath the Student Level text. Press Enter. 9. Type Elementary in the Button Text entry field and press Enter. Drag the right edge of the frame that surrounds the radio button until you can see all of the text. 10. Select Radio Button again and type Intermediate in the Text entry field. Position this radio button below the first one. 11. Select Radio Button again and type Advanced in the Text entry field. Position this radio button below the other two. 12. Select Group Box from the Control menu. Position the cursor to the right of the column of radio buttons and press Enter. 13. Type Media in the Text entry field and press Enter to title the group box. 14. Click on the lower-right corner of the group box frame and drag it diagonally down and to the right to enlarge it. The bottom of the group box frame should be lower than the last of the radio buttons, and the right-hand side of the group box should be almost at the far right of the dialog box. This is to make room for a group of check boxes that will go inside the group box. When you use group boxes to group controls, you always create the group box before the controls that are to go inside it. 15. Select Check Box from the Control menu. Position the cursor inside the group box in line with the first radio button in the list, and click the mouse. 16. Type TextBooks in the Button Text entry field and press Enter. Enlarge the frame of the check box until all of the text is displayed. 17. Select Check Box again and position the cursor below the first check box. Type Video in the Text entry field and click Enter. Enlarge the check box frame until all of the text is displayed. 18. Select Check Box again and position the cursor below the previous two check boxes. Type Diskettes in the Text entry field. In the left-hand side of the dialog box, you should now have a column of radio buttons with a heading of Student Level, and on the right a group box with a heading of Media that contains three check boxes. 19. Finally, add three push buttons to the dialog box. Select Pushbutton from the Control menu. Position the cursor in the lower-left side of the dialog box and click the mouse. Type OK in the Text entry field and press Enter. 20. Position another push button to the right of the first one (in the lower middle of the dialog box) and type Cancel in the Text entry field. 21. Select a third push button and position it to the right of the second. Type Help in the Text entry field. The dialog box and its controls are now complete. Try selecting each of the controls, and observe the information in the Selected Item Status. It holds information about each control that you edit. You might now want to test the dialog box. ═══ 5.2.5. Selecting Color and Font ═══ The Presentation Parameters dialog allows you to select the color and font for individual controls or for an entire dialog box. You can select all of the following: o Foreground Color o Background Color o Foreground Color Highlight o Background Color Highlight o Disabled (greyed out) Foreground Color o Disabled (greyed out) Background Color o Font Size o Font Name To set presentation parameters, follow these steps: 1. Select a control or the dialog box. 2. Select Presentation Parameters from the Edit menu. 3. Type the number, from 1 to 255 parts of each color, in the appropriate fields. 4. Type the font size and name, if you want to change the default, in the last two fields. 5. Select OK or press Enter to close the dialog. You might now want to test the dialog. ═══ 5.2.6. Arranging Controls ═══ The Arrange menu allows you to arrange and align controls in a logical and easy-to-understand layout. Align Aligns controls along an edge. Even spacing Evenly spaces controls Same size Sets controls to the same size. Push buttons Arranges push buttons. Order groups Displays the Groups-order dialog, so you can change the order of controls and groups. Settings Displays the Settings-change dialog, so you can change the grid and spacing constants. ═══ 5.3. Changing the Dialog Box ═══ To change the properties of a dialog box or a single control, use the following functions of the Edit menu: o Select New Dialog to create another dialog box in the same resource file. Your existing dialog box will stay in memory. o Select Select Dialog to switch to another open dialog box. o Select Symbols to define symbols. Eight of the editing functions require that you first select the control to be edited. The selected control will appear in the drag window, surrounded by eight dots, one in each corner and one at the midpoint of each side. The following functions require that a control must first be selected: o Select Cut to cut a control you would like to move or delete. o Select Copy to copy to the clipboard a control you would like to duplicate elsewhere in the same dialog or in another dialog. o Select Paste to place a control you have marked with Cut or Copy. o Select Clear to erase a control. o Select Duplicate to create another control in this dialog box that is identical to the selected control. o Select Styles to define the style of the selected control. o Select Presentation parameters to select the colors and fonts. o Select Size to text to adjust the size of an entry field to the text inside. ═══ 5.3.1. Using the Options Menu ═══ On the Options menu, a check mark next to each option shows whether it is selected (on) or not (off). To toggle your selection of options on and off, use the following functions of the Options menu: o Select Test mode to test the dialog. o Select Hex mode to toggle between hexadecimal and decimal display of ID Values of symbols. o Select Translate mode to toggle translate mode on and off. o Select Enable 2.x styles to use controls and their styles which are specific to OS/2 2.x, but not prior releases. o Select Show status area to toggle display of the status area on and off. ═══ 5.3.2. Testing the Dialog Box ═══ To test the dialog box, select Test Mode from the Options menu. The dialog box is displayed as it will appear to the user in a program. In test mode, you can select controls, and their appearance changes in the same way as they do in an application. To return to work mode, click on Test Mode again to de select it. If you want to make changes, you can edit the dialog box. ═══ 5.3.3. Ending an Edit Session ═══ To end the edit session, select Close from the system pull-down menu. You see prompts for the file names of the files you want to save. If you want to edit the same file the next time you use the editor, select Open from the File menu. ═══ 5.4. Dialog Templates ═══ The Dialog Editor creates an ASCII text file that has the file-name extension .DLG. The compiled form of this file, created using the Resource Compiler, has the file-name extension .RES. The .DLG file contains a series of statements, collectively termed a dialog template, that define each dialog box and each control in each dialog box. The statement for each dialog box contains the data required to create it, namely its class, size, position, window text, and any other special information required for the window. Normally, the template consists of a dialog box window followed by the controls contained within it, which are child windows. The first statement in the template is the DLGINCLUDE statement, which specifies the file name of the include file. The next statement is the DLGTEMPLATE statement, which specifies the symbolic identifier of the dialog box (MYDIALOG). The DLGTEMPLATE statement also specifies any loading and memory options. The actual dialog template is contained within the first BEGIN and last END statement. There is a CONTROL statement for each of the controls in the dialog box. The CONTROL statement is a general statement that is followed by parameters that further specify the control, such as: o Text, where appropriate. For example, the text OK is defined for one of the push buttons. o Application-defined symbolic or integer identifiers for each control. Your application uses the identifier to track the responses from controls. For example, ID_NULL is the identifier of the text control. o The types and positions of the various controls. For example, the group box control is a control window of window class WC_STATIC. The Cancel and Help push buttons are of window class WC_BUTTON. o The appearance and operation of the dialog box and its controls, which are specified in detail by combinations of style parameters. For example, the check boxes have a class style of BS_CHECKBOX, and radio buttons have a class style of BS_RADIOBUTTON. You can also specify appropriate WS_* styles. If necessary, you can use a text editor to edit the .DLG file, for example, to fine-tune the dialog template produced by the dialog box editor. You can even use a text editor to produce your own .DLG file. The Dialog Editor uses the general CONTROL statement with window classes and control styles to define controls. You can use the CONTROL statement in the same way to define your controls, or you can use any of several predefined control statements that give you the same result. For example, the predefined control statement PUSHBUTTON gives you a WC_BUTTON class window with default styles of BS_PUSHBUTTON and WS_TABSTOP. The predefined controls are described in the following sections. ═══ 5.4.1. AUTOCHECKBOX Statement ═══ The AUTOCHECKBOX statement creates an automatic-check-box control. The control is a small rectangle (check box) that contains a check when the user selects it. The specified text is displayed to the right of the check box. A check appears in the square when the user first selects the control and disappears the next time the user selects it. The AUTOCHECKBOX statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, coordinates, dimensions, and attributes of a control window. The predefined class for this control is WC_BUTTON. If you do not specify the style, the default style is BS_AUTOCHECKBOX and WS_TABSTOP. ═══ 5.4.2. AUTORADIOBUTTON Statement ═══ The AUTORADIOBUTTON statement creates an automatic-radio-button control. This control is a small circle with the given text displayed to its right. The control highlights the circle and sends a message to its parent window when the user selects the button. The control also removes the selection from any other automatic-radio-button controls in the same group. When the user selects the button again, the control removes the highlight before sending a message. The AUTORADIOBUTTON statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, coordinates, dimensions, and attributes of a control window. The predefined class for this control is WC_BUTTON. If you do not specify a style, the default style is BS_AUTORADIOBUTTON. ═══ 5.4.3. CHECKBOX Statement ═══ The CHECKBOX statement creates a check-box control. The control is a small rectangle (check box) that has the specified text displayed to the right. The control highlights the rectangle and sends a message to its parent window when the user selects the control. The CHECKBOX statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, coordinates, dimensions, and attributes of a control window. The predefined class for this control is WC_BUTTON. If you do not specify a style, the default style is BS_CHECKBOX and WS_TABSTOP. ═══ 5.4.4. COMBOBOX Statement ═══ The COMBOBOX statement creates a combination-box control. This control combines a list-box control with an entry-field control. It allows you to place the selected item from a list box into an entry field. The COMBOBOX statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, coordinates, dimensions, and attributes of a control window. The predefined class for this control is WC_COMBOBOX. If you do not specify a style, the default style is CBS_SIMPLE, WS_GROUP, WS_TABSTOP, and WS_VISIBLE. ═══ 5.4.5. CONTAINER Statement ═══ The CONTAINER statement creates a container control within a dialog window. The container control is a visual component that holds objects. The CONTAINER statement defines the identifier, coordinates, dimensions, and attributes of a container control. The predefined class for this control is WC_CONTAINER. If you do not specify a style, the default style is WS_TABSTOP, WS_VISIBLE, and CCS_SINGLESEL. Example This example creates a container control at position (30,30) within the dialog window. The container has a width of 70 character units and a height of 25 character units. Its resource ID is 301. The default style CCS_SINGLESEL has been overridden by the style specification CCS_MULTIPLESEL. The default styles WS_TABSTOP and WS_GROUP are both in effect, though only the latter is specified. #define IDC_CONTAINER 301 #define IDD_CONTAINERDLG 504 DIALOG "Container", IDD_CONTAINERDLG, 23, 6, 120, 280, FS_NOBYTEALIGN | WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR BEGIN CONTAINER IDC_CONTAINER, 30, 30, 70, 200, CCS_MULTIPLESEL | WS_GROUP END ═══ 5.4.6. DEFPUSHBUTTON Statement ═══ The DEFPUSHBUTTON statement creates a default push button control. The control is a round-cornered rectangle containing the given text. The rectangle has a bold outline to represent that it is the default response for the user. The control sends a message to its parent window when the user chooses the control. The DEFPUSHBUTTON statement, which you can use only in a DIALOG or WINDOW statement, lets you define the coordinates, dimensions, and attributes of the default push button control. The predefined class for this control is WC_BUTTON. If you do not specify a style, the default style is BS_PUSHBUTTON, BS_DEFAULT, and WS_TABSTOP. ═══ 5.4.7. EDITTEXT or ENTRYFIELD Statement ═══ The EDITTEXT or ENTRYFIELD statement creates an entry-field control. This control is a rectangle in which the user can type and edit text. The control displays a pointer when the user selects the control. The user can then use the keyboard to enter text or edit the existing text. Editing keys include the Backspace and Delete keys. By using the mouse or the direction-arrow keys, the user can select the character or characters to delete or select the place to insert new characters. The EDITTEXT or ENTRYFIELD statement defines the text, identifier, coordinates, dimensions, and attributes of a control window. The predefined class for this control is WC_ENTRYFIELD. If you do not specify a style, the default style is ES_AUTOSCROLL and WS_TABSTOP. The EDITTEXT control statement is identical to the ENTRYFIELD control statement. Use the EDITTEXT or ENTRYFIELD statement only in a DIALOG or WINDOW statement. ═══ 5.4.8. FRAME Statement ═══ The FRAME statement defines a frame window. The statement defines the title, identifier, position, and dimensions of the frame window, as well as the window style. The FRAME statement is most often used in a WINDOWTEMPLATE statement, and typically, only one FRAME statement is used. The FRAME statement, in turn, typically contains at least one WINDOW statement that defines the client window belonging to the frame window. The frame window has no default style. You must use the framectl field to define additional frame controls, such as a title bar and system menu, to be created when the frame window is created. If the text field is not empty, the statement automatically adds a title-bar control to the frame window, whether or not you specify the FCF_TITLEBAR style. Frame controls are given default styles and control identifiers based on their class. For example, a title-bar control receives the identifier FID_TITLEBAR. The FRAME statement can actually contain any combination of CONTROL, DIALOG, and WINDOW statements. Typically, a FRAME statement contains one WINDOW statement. Example This example creates a standard frame window, with title bar, a system menu, minimize and maximize boxes, and a vertical scroll bar. The FRAME statement contains a WINDOW statement defining the client window belonging to the frame window. WINDOWTEMPLATE 1 BEGIN FRAME "My Window", 1, 10, 10, 320, 130, 0, FCF_STANDARD | FCF_VERTSCROLL BEGIN WINDOW "", FID_CLIENT, 0, 0, 0, 0, "MyClientClass" END END ═══ 5.4.9. GROUPBOX Statement ═══ The GROUPBOX statement creates a group-box control. The control is a rectangle that groups other controls together. A border is drawn around the groups, and text is displayed in the upper-left corner. The GROUPBOX statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, coordinates, dimensions, and attributes of a group-box control. The predefined class for this control is WC_STATIC. If you do not specify a style, the default style is SS_GROUPBOX and WS_TABSTOP. ═══ 5.4.10. ICON Statement (Control) ═══ This form of the ICON statement creates an icon control. This control is an icon displayed in a dialog box. The ICON statement, which you can use only in a DIALOG or WINDOW statement, defines the icon-resource identifier, icon-control identifier, position, and attributes of a control window. The predefined class for this control is WC_STATIC. If you do not specify a style, the default style is SS_ICON. For the ICON statement, the width and height fields are ignored; the icon automatically sizes itself. ═══ 5.4.11. LISTBOX Statement ═══ The LISTBOX statement creates commonly used controls for a dialog box or window. The control is a rectangle containing a list of user-selectable strings, such as file names. The LISTBOX statement, which you can use only in a DIALOG or WINDOW statement, defines the identifier, coordinates, dimensions, and attributes of a control window. The predefined class for this control is WC_LISTBOX. If you do not specify a style, the default style is WS_TABSTOP. ═══ 5.4.12. MLE Statement ═══ The MLE statement creates a multiple-line entry-field control. The control is a rectangle in which the user can type and edit multiple lines of text. The control displays a pointer when the user selects it. The user can then use the keyboard to enter text or edit the existing text. Editing keys include the Backspace and Delete keys. By using the mouse or the direction-arrow keys, the user can select the character or characters to delete or select the place to insert new characters. The MLE statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, coordinates, dimensions, and attributes of a control window. The predefined class for this control is WC_MLE. If you do not specify a style, the default style is MLS_BORDER, WS_GROUP, and WS_TABSTOP. If the MLS_READONLY style is not specified, the user can edit the text. ═══ 5.4.13. NOTEBOOK Statement ═══ The NOTEBOOK statement creates a notebook control within the dialog window. This control is used to organize information on individual pages so that it can be located and displayed easily. The NOTEBOOK statement defines the identifier, coordinates, dimensions, and attributes of a notebook control. The predefined class for this control is WC_NOTEBOOK. If you do not specify a style, the default style is WS_TABSTOP and WS_VISIBLE. The NOTEBOOK statement is used only in a DIALOG or WINDOW statement. Example This example creates a notebook control at position (20, 20) within the dialog window. The notebook has a width of 200 character units and a height of 32 character units. Its resource ID is 201. The tabs style BKS_ROUNDEDTABS specification overrides the notebook default style of square tabs. The default styles WS_TABSTOP and WS_GROUP are both in effect, though only the latter is specified. #define IDC_NOTEBOOK 201 #define IDD_NOTEBOOKDLG 503 DIALOG "Notebook", IDD_NOTEBOOKDLG, 11, 11, 420, 420, FS_NOBYTEALIGN | WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR BEGIN NOTEBOOK IDC_NOTEBOOK, 20, 20, 200, 400, BKS_ROUNDEDTABS | WS_GROUP END ═══ 5.4.14. PUSHBUTTON Statement ═══ The PUSHBUTTON statement creates a push button control. The control is a round-cornered rectangle containing the given text. The control sends a message to its parent whenever the user chooses the control. The PUSHBUTTON statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, coordinates, dimensions, and attributes of a control window. The predefined class for this control is WC_BUTTON. If you do not specify a style, the default style is BS_PUSHBUTTON and WS_TABSTOP. ═══ 5.4.15. RADIOBUTTON Statement ═══ The RADIOBUTTON statement creates a radio-button control. The control is a small circle that has the given text displayed to its right. The control highlights the circle and sends a message to its parent window when the user selects the button. The control removes the highlight and sends a message when the button is next selected. The RADIOBUTTON statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, coordinates, dimensions, and attributes of a control window. The predefined class for this control is WC_BUTTON. If you do not specify a style, the default style is BS_RADIOBUTTON. ═══ 5.4.16. SLIDER Statement ═══ The SLIDER statement creates a slider control within the dialog window. This control lets the user set, display, or modify a value by moving a slider arm along a linear slider shaft. The SLIDER statement defines the identifier, coordinates, dimensions, and attributes of a slider control. The predefined class for this control is WC_SLIDER. If you do not specify a style, the default style is WS_TABSTOP and WS_VISIBLE. The SLIDER statement is used only in a DIALOG or WINDOW statement. ═══ 5.4.17. SPINBUTTON Statement ═══ The SPINBUTTON statement creates a spin button control within the dialog window. This control gives the user quick access to a finite set of data. The SPINBUTTON statement defines the identifier, coordinates, dimensions, and attributes of a spin button control. The predefined class for this control is WC_SPINBUTTON. If you do not specify a style, the default style is WS_TABSTOP, WS_VISIBLE, and SPBS_MASTER. The SPINBUTTON statement is used only in a DIALOG or WINDOW statement. ═══ 5.4.18. Static Text Statements: LTEXT, CTEXT and RTEXT ═══ Each of these statements creates a static text control. The control is a simple rectangle displaying the given text, which is either aligned to one edge or centered in the rectangle. The text is formatted before it is displayed. Words that would extend past the end of a line are automatically wrapped to the beginning of the next line. These three statements, which you can use only in a DIALOG or WINDOW statement, define the text, identifier, coordinates, dimensions, and attributes of a static text control. The predefined class for this control is WC_STATIC. If you do not specify a style, the default style is SS_TEXT, WS_GROUP, and the appropriate alignment flag (DT_LEFT, DT_CENTER, or DT_RIGHT respectively). ═══ 5.4.19. VALUESET Statement ═══ The VALUESET statement creates a value-set control within the dialog window. This control lets a user select one choice from a group of mutually exclusive choices. The VALUESET statement defines the identifier, coordinates, dimensions, and attributes of a value-set control. The predefined class for this control is WC_VALUESET. If you do not specify a style, the default style is WS_TABSTOP and WS_VISIBLE. The VALUESET statement is used only in a DIALOG or WINDOW statement. Example This example creates a value-set control at position (40, 40) within the dialog window. The value set control has a width of 220 character and a height of 20 character units. Its resource ID is 302. The style specification VS_ICON creates a control to show items in icon form. The default styles WS_TABSTOP and WS_VISIBLE are both in effect, though only WS_TABSTOP is specified. #define IDC_VALUESET 302 #define IDD_VALUESETDLG 501 DIALOG "Value set", IDD_VALUESETDLG, 11, 11, 260, 240, FS_NOBYTEALIGN | WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR BEGIN VALUESET IDC_VALUESET, 40, 40, 220, 160, VS_ICON | WS_TABSTOP END A dialog template can be in either of the following: o A resource.res file (generated from the .DLG file by the Resource Compiler) o A block of memory that has the DLGTEMPLATE data structure, in which case you use WinCreateDlg to create the dialog box from the template. The dialog template uses device-independent dialog units for the coordinate system that define the layout of controls in the dialog box. A dialog unit is expressed in terms of the default standard character size, which can vary from device to device. You do not need to put code in your application to reformat the dialog box when displaying it on different devices. (Dialogs might need editing if a different system font is loaded.) A horizontal dialog unit is 0.25 of the standard character size. A vertical dialog unit is 0.125 of the standard character size. Dialog units are expressed as offsets from the origin (lower-left corner) of the dialog box. A dialog template is a general structure. It could be termed a window template, because you can use it to define any window in an application. If you prefer, use the statement WINDOWTEMPLATE instead of DLGTEMPLATE, because it is functionally identical. This could reduce the initialization phase of the application to registering the application window classes and calling WinLoadDlg to load the template. If you use the Dialog Editor to define a standard window, you will have to edit the resulting .DLG file to ensure that you have a client window and the required parent-child relationships. You will also have to use WinLoadMenu in your application, to create a menu bar for the window, because you cannot create menus using the Dialog Editor. The .RES file is an object-format compiled version of the .DLG file, created when the Dialog Editor compiles the dialogs. The Dialog Editor uses the .RES file as input on any subsequent edit of the same dialog. This means that, if you use a text editor to fine-tune a .DLG file, and you want subsequently to re-edit the dialog using the Dialog Editor, you must first use the Resource Compiler to generate a new .RES file from the .DLG file. Your application can use either the .RES file output by the Dialog Editor or a .RES file created from the .DLG file and the other resources. If your application uses the .DLG file, it must be included by the resource script file of your application. The rcinclude statement includes the .DLG file created by the Dialog Editor; for example: rcinclude dbe.dlg /* Includes .DLG file */ The corresponding .H file created by the Dialog Editor must also be included in the .RC file. Using OS/2-defined control windows, OS/2 draws and operates the controls specified in the resource file for your application. Controls are windows and can be used within any other window. ═══ 5.4.20. Sample Dialog Template File ═══ The following dialog template is used for the dialog described in Adding Controls Example. DLGINCLUDE 1 "DBE.H" DLGTEMPLATE mydialog LOADONCALL MOVEABLE DISCARDABLE BEGIN DIALOG "Sample Dialog Box", mydialog, 11, 8, 170, 105, FS_NOBYTEALIGN | FS_DLGBORDER | WS_VISIBLE | WS_SAVEBITS, FCF_TITLEBAR BEGIN CONTROL "Student Level:", id_null, -1, 94, 63, 9, WC_STATIC, SS_TEXT | DT_LEFT | DT_TOP | WS_GROUP | WS_VISIBLE CONTROL "Elementary", 258, 7, 82, 62, 11, WC_BUTTON, BS_RADIOBUTTON | WS_GROUP | WS_TABSTOP | WS_VISIBLE CONTROL "Intermediate", 259, 7, 67, 73, 9, WC_BUTTON, BS_RADIOBUTTON | WS_VISIBLE CONTROL "Advanced", 260, 7, 51, 52, 13, WC_BUTTON, BS_RADIOBUTTON | WS_VISIBLE CONTROL "Media", 261, 87, 48, 75, 54, WC_STATIC, SS_GROUPBOX | WS_GROUP | WS_VISIBLE CONTROL "Textbooks", 262, 97, 83, 60, 10, WC_BUTTON, BS_CHECKBOX | WS_TABSTOP | WS_VISIBLE CONTROL "Video", 263, 97, 68, 46, 10, WC_BUTTON, BS_CHECKBOX | WS_VISIBLE CONTROL "CBT", 264, 97, 53, 32, 10, WC_BUTTON, BS_CHECKBOX | WS_VISIBLE CONTROL "OK", 265, 7, 20, 38, 12, WC_BUTTON, BS_PUSHBUTTON | WS_GROUP | WS_TABSTOP | WS_VISIBLE CONTROL "Cancel", 266, 61, 20, 38, 12, WC_BUTTON, BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE CONTROL "Help", 267, 117, 20, 38, 12, WC_BUTTON, BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE END END ═══ 6. Executable File Header Utility (EXEHDR) ═══ The Executable File Header Utility (EXEHDR) displays and modifies the contents of an executable-file header. EXEHDR generates an Output listing showing the contents of the file header and information about each object or segment in the file. Options are provided that let you change values in the file header. Uses of EXEHDR include: o Determining whether a file is an application or a dynamic link library o Viewing and changing the attributes set by the module definition file o Viewing the number and size of code and data segments. You can use EXEHDR with DOS or OS/2 applications and dynamic-link libraries. ═══ 6.1. Syntax ═══ EXEHDR [options] filename Options used to modify Output or change the file header. One or more names of applications or dynamic-link library files. Regardless of options, EXEHDR always creates an Output listing of the file header. ═══ 6.1.1. Help ═══ To display EXEHDR help, type EXEHDR /? at the command prompt. The appropriate copyright statement appears along with a brief list of EXEHDR options. Usage: EXEHDR [options] filename... Valid options are: /? /HEAP:(0H - ffffH) /HELP /MAX:(0H - ffffH) /MIN:(0H - ffffH) /NEWFILES /NOLOGO /PMTYPE:(PM | VIO | NOVIO | WINDOWAPI | WINDOWCOMPAT | NOTWINDOWCOMPAT) /RESETERROR /STACK:(0H - ffffH) /VERBOSE ═══ 6.2. Options ═══ Usage Notes: o Option characters are not case sensitive: /R and /r are equivalent. o Options can be shortened to the fewest characters that uniquely identify them. The characters in brackets can be omitted: /N and /NOLOGO are equivalent. o Although use of the minimum one-letter abbreviations is allowed, if a future release has an additional option starting with the same letter, the one-letter option will no longer be usable. ═══ 6.2.1. Formats Affected by Options ═══ The EXEHDR options that can change executable files are MIN, MAX, STACK, PMTYPE, HEAP, RESETERROR, and NEWFILES. Executable headers are used by the operating system to determine characteristics of the executable file, such as stack size, entry point, number of objects (or segments), and so on. EXEHDR recognizes three different kinds of executable headers: DOS (generated by DOS linker), OS/2 16-bit (generated by LINK), and OS/2 32-bit (generated by LINK386). An X in the following table indicates which option changes which executable header: ┌───────────────┬───────────────┬───────────────┬───────────────┐ │Option │DOS │OS/2 16-bit │OS/2 32-bit │ │ │ │(LINK) │(LINK386) │ ├───────────────┼───────────────┼───────────────┼───────────────┤ │HEAP │ │X │X │ ├───────────────┼───────────────┼───────────────┼───────────────┤ │MAX │X │ │ │ ├───────────────┼───────────────┼───────────────┼───────────────┤ │MIN │X │ │ │ ├───────────────┼───────────────┼───────────────┼───────────────┤ │NEWFILES │ │X │ │ ├───────────────┼───────────────┼───────────────┼───────────────┤ │PMTYPE │ │X │X │ ├───────────────┼───────────────┼───────────────┼───────────────┤ │RESETERROR │ │X │X │ ├───────────────┼───────────────┼───────────────┼───────────────┤ │STACK │X │X │ │ └───────────────┴───────────────┴───────────────┴───────────────┘ For compatibility purposes, executable files generated by either of the OS/2 link utilities include both a DOS header and an OS/2 header. For example, if you use /STACK on an executable generated by OS/2 LINK (16-bit), the DOS header and the OS/2 header will be changed. ═══ 6.2.1.1. /HEA[P] ═══ Set Heap Allocation (/HEAP) Syntax: /HEA[P]:nnnn This option sets the size of the local heap and is applicable to OS/2 applications only. The field contains the local heap size in bytes. You can specify in decimal, octal, or hexadecimal radix using standard C language notation. ═══ 6.2.1.2. /HEL[P] and /? ═══ Display Help (/HELP or /?) Syntax: /HEL[P] OR /? This option displays a brief summary of EXEHDR syntax. ═══ 6.2.1.3. /MA[X] ═══ Set Maximum Allocation (/MAX) Syntax: /MA[X]:nnnn This option sets the maximum allocation of memory for the program. The field contains the maximum number of 16-byte paragraphs required to load and run the program. This value must be equal to or greater than the minimum allocation. Compare to /MI. The Maximum Allocation option is equivalent to the LINK386 /CP option. Refer to Set Max Allocation Space (/CP) (in LINK386 Help) You can specify in decimal, octal, or hexadecimal radix using standard C language notation. ═══ 6.2.1.4. /MI[N] ═══ Set Minimum Allocation (/MIN) Syntax: /MI[N]:nnnn This option sets the minimum allocation of memory for the program. The field contains the minimum number of 16-byte paragraphs required to load and run the program. This value must be equal to or less than the maximum allocation. Compare to /MA. You can specify in decimal, octal, or hexadecimal radix using standard C language notation. ═══ 6.2.1.5. /NE[WFILES] ═══ New Files (/NEWFILES) Syntax: /NE[WFILES] This option enables long file name support for OS/2 16-bit LINK files. OS/2 32-bit LINK386 files have long file name support. ═══ 6.2.1.6. /NO[LOGO] ═══ Suppress Sign-On Banner (/NOLOGO) Syntax: /NO[LOGO] This option suppresses the sign-on banner displayed by EXEHDR when it starts. ═══ 6.2.1.7. /P[MTYPE] ═══ Set Application Type (/PMTYPE) Syntax: /P[MTYPE]:type This option specifies the type of application. It pertains only to OS/2 applications. The /PMTYPE option in EXEHDR is equivalent to either the NAME Statement in the module-definition file or the Name Application Type (/PM) in LINK386. A keyword in is equivalent to a keyword in a NAME statement, as shown in the following list: Field Keyword Equiv. Keyword PM WINDOWAPI VIO WINDOWCOMPAT NOVIO NOTWINDOWCOMPAT The NAME statement keyword is also accepted. ═══ 6.2.1.8. /R[ESETERROR] ═══ Reset LINK386 Error (/RESETERROR) Syntax: /R[ESETERROR] This option clears an error flag stored in OS/2 applications. The error flag is set by LINK386 when the link has unresolved external references or duplicate symbol definitions (any LINK386 error messages starting with L2xxx). OS/2 does not load the application if the error flag is set. This option allows you to attempt to run a program with LINK386 errors and is useful during application development. ═══ 6.2.1.9. /S[TACK] ═══ Set Stack Allocation (/STACK) Syntax: /S[TACK]:nnnn This option sets the size of the stack. The field contains the stack size in bytes. This option is equivalent to the Control Stack Size (/ST) (in LINK386 Help). You can specify in decimal, octal, or hexadecimal radix using standard C language notation. ═══ 6.2.1.10. /V[ERBOSE] ═══ Display in Verbose Mode (/VERBOSE) Syntax: /V[ERBOSE] This option displays the executable-file header in verbose mode. ═══ 6.3. Output ═══ EXEHDR lists the current contents of the file header and information about each object (or segment) in the file. To redirect this output to a printer or disk file, use the operating system redirection operator. The output is in two parts: a Header Listing giving the contents of the file header; and an Object or Segment Listing giving attributes of all objects (or segments) in the file. If the /VERBOSE option is specified, additional output is generated. ═══ 6.3.1. Header Listing ═══ The header listing is comprised of the following fields: Name of Application This field lists the name of the application as specified in the NAME statement of the module-definition file. If no module definition was used to create the executable file, this field displays the name assumed by default. If a module definition was used to create the file, but the LIBRARY statement appeared instead of the NAME statement (thus specifying a dynamic-link library), the name of the library is given and EXEHDR uses the word "Library" instead of "Module" to identify the field. Description of Application This field gives the contents, if any, of the DESCRIPTION statement of the module-definition file used to create the file being examined. Type of Automatic Data Object This field indicates the type of automatic data segment in a program: SHARED, NONSHARED, or NONE. This type can be specified in a module-definition file. The defaults are NONSHARED for applications and SHARED for dynamic-link libraries. Program Starting Address This field gives the program starting address (if an application is being examined) or address of the initialization routine (if a dynamic-link library is being examined). Initial Stack Pointer This field gives the value of the initial stack pointer. Additional stack allocation This field gives the value of the extra stack location. Automatic-Data-Object Number ═══ 6.3.2. Object or Segment Listing ═══ The object listing is comprised of the following fields: no. Object index number, starting with 1, in decimal type Identification of the object as a code or data object A code object is comprised of segments with class name ending in CODE. All other objects are data objects. address Location, within the file, of the contents of the object (in hexadecimal) file Size of the object (in bytes), as contained in the file (in hexadecimal) mem Size of the object (in bytes), as it is stored in memory (in hexadecimal) If the value of this field is greater than the value of , the operating system pads the additional space with zero values at load time. flags Object attributes If the /VERBOSE option is not used, only nondefault attributes are listed. Attributes are given in the form specified in the module-definition file. ═══ 6.3.3. Output Example ═══ The following output is generated by EXEHDR for the executable file LINK386.EXE: Module: LINK386 Description: Operating System/2 32-bit LX Linker Data: NONSHARED Initial CS:IP: seg 2 offset 6c78 Initial SS:SP: seg 4 offset 0000 Extra stack allocation: 4000 bytes DGROUP: seg 4 no. type address file mem flags 1 CODE 00006000 0f7d6 0f7d7 2 CODE 00015a00 08e40 08e40 3 DATA 0001ea00 02865 02865 4 DATA 00021400 02337 08bd0 ═══ 6.3.4. Verbose Output ═══ When you specify the /VERBOSE option, EXEHDR generates additional output: o DOS-specific header information. All OS/2 executable files have a DOS header, whether bound or not. If the program is not bound, the DOS portion typically consists of a stub that simply terminates the program. o OS/2-specific header information. The object-table display in verbose mode is described below. o File addresses and lengths of the various tables in the executable file. For each table, the following is generated: - Name of the table - Address of the table within the file - Length of the table in hexadecimal radix - Length of the table in decimal radix o Object table with complete attributes, not just the nondefault attributes. The /VERBOSE option displays two additional attributes: - The RELOCS attribute is displayed for each object that has address relocations. Relocations occur in each object that references objects in other objects or makes dynamic-link references. - The ITERATED attribute is displayed for each object that has iterated data. Iterated data consist of a special code that packs repeated bytes. o Run-time relocations and fixups. o All exported entry points. ═══ 7. Font Editor ═══ You can use the OS/2 Font Editor to design and save your own fonts for use in applications. A font is a set of alphanumeric characters, punctuation marks, and other symbols that share a common typeface design and line weight. An application loads a font from a dynamic-link library file (.DLL file). The Font Editor allows you to edit an enlarged version of each character in an editing window, using the mouse to switch the enlarged representation of pels to black or white. You can change a series of pels by dragging the mouse pointer through them while holding down the mouse button. An enlarged scale version of the character is shown in a viewing window to the right of the edit window. ═══ 7.1. Using the Font Editor ═══ To run the Font Editor, select Font Editor from the PM Development Tools folder. Select one of the options in the File menu to open a new or existing font. The letter A appears in both the editing and viewing windows. The rest of the font appears in the character selection scroll box at the bottom of the Font Editor window. To edit any other character in the font, select it from the character selection scroll box. The character appears in the editing and viewing windows. Font Editing Functions Functions for defining fonts are found on the Header menu. Functions for editing character width are found on the Width and Shift menus. ═══ 7.1.1. Defining Fonts ═══ Use the Header menu to define the typestyle that you want to create: o Select Naming to specify the identification details such as the type-face name. o Select General to specify spacing (fixed or proportional), type face style, line width, and type weight. o Select Sizes to specify the font character dimensions. o Select Relations to specify the position of characters. o Select Definition to change character spacing in a proportional font. ═══ 7.1.2. Editing Character Width ═══ The Width and Shift menus allow you to change the width of individual characters. The Width Menu Use the Width menu to alter the width of a single character. This menu is enabled only when you are editing a proportional space font. You can make a character wider or narrower by adding or deleting columns of pels from the right, the left, or both sides. You may also use the Set Character Increment option to set the width of a character. On-line help panels describe how to perform these functions. The Shift Menu Use the Shift menu to insert a one-pel-wide row or column into (or delete from) the character that you are editing. When you select shift, the pointer becomes a flat horizontal or vertical bar when inside the edit window. This enables you to position it exactly where you want the operation to take place. To cancel a shift you have selected before execution, select Cancel Choice. ═══ 7.1.3. Font Resource Files ═══ The Font Editor creates a file with a .FNT extension. The .FNT file is not referred to in the same resource file as other resources. Instead, it has its own resource file that contains a single-line statement that has a similar format to the ICON, POINTER, and BITMAP statements, for example: FONT 101 myfont.fnt /* Font */ The FONT keyword identifies the resource type. The resource type is followed by an integer identifier that is used by the application to identify the resource. The integer is used as a parameter to the WinCreateStdWindow call. You cannot use a symbolic name for a font. The integer identifier can be followed by loading and memory options. Again, the example lets them default. The last part of the statement is the file name of the resource created by the Font Editor. A full path name must be given if it is not in the current directory. Producing a font file uses a process similar to binding resources to an .EXE file. You bind one or more .FNT files to a dummy .DLL, to produce a file containing the font or fonts. The final file should have the extension .FON. The .FON file created by the process is installed on the system and becomes a public font, a font that can be used by any application in the system. A font not installed on the system is called a private font. Before your application can use the font, your application must use GpiLoadFonts to load the .FON file. ═══ 8. Forwarded Entry Point (FWDSTAMP) ═══ FWDSTAMP adds entry points, called forwarders, to a dynamic link library file (.DLL). Forwarders point to API functions or other exported code or data. They contain an import reference so that the final target address of the forwarded entry is contained in a different module. A forwarder might be called an imported export. When a file has a fix-up to a forwarded entry point, the loader resolves that fix-up to the address of the entry point that the forwarder imports, by traversing the chain of forwarders until the end of the chain (a nonforwarded export) is reached. All forwarders are implicitly exported. The imported entry point that a forwarder refers to may itself be another forwarder. The loader will process a chain of forwarders until a nonforwarder entry point is encountered. There is no run-time cost to forwarders; however, there is a slight load-time cost as the loader resolves forwarder chains with their final addresses. ═══ 8.1. Using Forwarders ═══ You use forwarders to combine several DLLs into one without having to relink old applications. For example, if MOUCALLS and VIOCALLS were combined into a single DLL called NEWLIB.DLL, then MOUCALLS and VIOCALLS could be replaced with special DLLs containing forwarders to NEWLIB.DLL. Important Notes o FWDSTAMP parses only the IMPORTS and EXPORTS section of the module definition file. FWDSTAMP does not verify the syntax of the other sections. o When exported names already exist in the input file, their attributes are kept, such as resident or nonresident names table, and ordinal numbers. Any new conflicting attributes are ignored. o If there is no exported name, FWDSTAMP adds the one defined by the EXPORTS statement in the module definition file. ═══ 8.1.1. Starting FWDSTAMP ═══ You can start FWDSTAMP and specify all input from the command line. An example of the syntax follows: FWDSTAMP [options] infile deffile outfile [options] Specifies one of the following: /? Displays FWDSTAMP help panel. /V Increases the level of information FWDSTAMP should output. infile Specifies the name of the dynamic link library file that LINK386 created. Use the file-name extension of DLL. deffile Specifies the name of the module definition file (.DEF) that contains the forwarders. (See Example). outfile Specifies the name of the .DLL file that will contain the added forwarders. ═══ 8.1.2. Example ═══ Forwarders are specified in the module definition file so that an exported name, which is also imported, is a forwarder. For example: IMPORTS VIOMODEWAIT=NEWLIB.123 EXPORTS VIOMODEWAIT @ 25 In the example, a forwarder entry point for VIOMODEWAIT is created and contains an import reference to NEWLIB.123. ═══ 9. Icon Editor ═══ The Icon Editor lets you create your own art (icons, pointers, and bit maps) and save them for use by applications. Icons, pointers, and bit maps produced by the Icon Editor are graphic symbols comprised of pels (also known as pixels) in any of the following display states: o Black o White o Color o Screen (background color) o Inverse screen (inverse of background color) An application can use an icon to represent a minimized standard window. For example, an application that lists telephone numbers could use a telephone icon when minimized. An application can also use icons as warning symbols in message boxes (for example, an exclamation mark or an upraised hand). An application can associate a pointer with the mouse or similar pointing device, so that the user can move the pointer around the screen, to select controls or text. A pointer could also be used in an interactive graphics application to draw graphics on the screen. For example, a free-hand graphics drawing application could use a pencil shape to represent the pointer. ═══ 9.1. Using the Icon Editor ═══ To run the Icon Editor, select the Development Tools folder and then select Icon Editor. The Icon Editor display consists of three parts: the information panel, the palette window, and the editing window. The information panel at the top of the Icon Editor window displays the following information: o A picture of a two-button mouse, showing the colors currently selected for each button o An actual-size image of the current figure that you are editing o The status area, showing the following: - Size (defined as 32 x 32 for icons and pointers; user-defined for bit maps) - Pen location - Pen size (from 1 x 1 to 9 x 9) - Hotspot (for icons and pointers, but not bit maps) - Figure type (icon, pointer, or bit map) - Form name The palette window, in the lower right corner, displays the colors that are available for use during editing. The colors currently selected are marked with frames. The editing window is the largest part of your working area. Use the mouse or keyboard to move the pointer, clicking or dragging the pointer to paint the enlarged representation of pels with the selected color. ═══ 9.1.1. Creating a Figure ═══ The Edit menu includes the functions used to select an icon, pointer, or bit map for editing, and to save it after you are through. Selecting your icon, pointer, or bit map 1. To create a new icon, pointer, or bit map, select New from the File menu. The New Figure pop-up window appears, prompting you for further information. Select the figure type: Icon, Pointer, or Bit map. For a bit map you must specify the width and height in pels. Select Enter. You can also create new art by modifying or editing an existing art of the same type. 2. To edit existing art, select Open from the File menu. You will be prompted for a name. Note: Unless you have turned off Safe Prompting (which is described under Setting Preferences) on the Options menu, you will be prompted to save if you select Open or New while there is unsaved art on your screen. 3. If you started Iconedit from a command prompt and specified multiple files, you can use the Next option on the File menu to select the next file. The Next option will be greyed out if you did not start from the command line and specify multiple files. Saving your icon, pointer, or bit map To save your art, select either of the following: o Select Save to save it under its current file name. If this is new art, you will be prompted for a name. o Select Save As to save the art under a different name. You will be prompted for a new name. ═══ 9.1.2. Editing Art ═══ To edit your art, use the functions of the Edit menu. Select Undo to restore the art to the way it was before the most recent editing operation. Four of the editing functions require that you first mark the area to be edited, using Select or Select All. If you choose Select, the cursor changes to a plus (+) inside a square. Hold the left mouse button down to anchor one corner, and then drag the mouse. Release the button to anchor the opposite corner of the rectangular area you want to edit. If you choose Select All, the entire figure is selected. Selected Edit Menu Functions The following functions all require that an area must first be selected: o Select Fill to fill the selected area with the current palette color. For additional information, see Filling Areas With Color. o Select Cut to cut an area you would like to move or delete. o Select Copy to copy an area you would like to duplicate elsewhere in the same file or in another file. o Select Paste to place an area you have marked with Cut or Copy. Drag the outlined area that you have marked to the place you would like to paste it. o Select Clear to erase all drawing within an area you have selected and leave transparent pels. If you have used Select All, this will clear your entire icon, pointer, or bit map. o Select Stretch Paste to paste the clipboard contents into your art, stretching and positioning to fit. o Select Flip Horizontal to flip the art on its horizontal axis, reversing bottom and top. o Select Flip Vertical to flip the art on its vertical axis, reversing left and right. You can create a symmetrical drawing by copying one side of the art to the other side, and then flipping one of them. o Select Circle to inscribe a circle or ellipse within the selected area. ═══ 9.1.3. Using Options ═══ The choices on the Options menu enable you to test your art and vary your editing environment. To change an option, from the Options menu select: Test To test view the pointer or icon you are editing. The pointer or icon will be displayed, actual size, as the pointer until you toggle back by again selecting Test from the Options menu. Grid To superimpose a grid over the editing window. This can be useful when you want to draw a symmetrical figure. Each cell of the grid represents one pel in the figure. X background To make the transparent pels (where the background is visible) apparent when editing an icon or pointer. All screen or inverse screen colors will be shown with an X. This option does not apply to bit maps because they have no transparent pels. Draw Straight To temporarily restrict your drawing to drawing straight vertical and horizontal lines. Even if you deviate from the horizontal row, a horizontal line is produced when the mouse pointer is dragged across the editing window. Dragging the mouse up or down produces straight vertical lines. Changing Pen Shape See Changing Pen Shape and Size Changing Pen Size See Changing Pen Shape and Size Setting Preferences See Setting Preferences Defining a Hotspot See Defining a Hotspot ═══ 9.1.3.1. Changing Pen Shape and Size ═══ You can change the shape and size of the pen by using choices on the Options menu. Changing Pen Shape Before you select Pen Shape, you must first select the shape using the Select function on the Edit Menu. See Editing Art for information about Select. Then select Set Pen Shape on the Options menu. Changing Pen Size Select Pen size on the Options menu to specify how many pels the pointer paints at a time. You can select any of nine square pen sizes: ┌───────────┬───────────┬───────────┐ │ 1x1 │ 4x4 │ 7x7 │ ├───────────┼───────────┼───────────┤ │ 2x2 │ 5x5 │ 8x8 │ ├───────────┼───────────┼───────────┤ │ 3x3 │ 6x6 │ 9x9 │ └───────────┴───────────┴───────────┘ Shortcut: Select a pen size by pressing Ctrl and the size, such as Ctrl+6 for a 6 x6 pen size. ═══ 9.1.3.2. Setting Preferences ═══ To change your preferences, select Preferences from the Options menu. Then select any of the following: Safe Prompting To be warned before destructive operations such as file overwrites. Suppress Warnings To suppress display of informational messages. Save State on Exit To save settings for your next session. Display Status Area To toggle on and off the picture of the mouse and art from the status area. Reset Options and Modes To deselect the following items: Select Hotspot Color Fill Find Color The palette will not be reset. ═══ 9.1.3.3. Defining a Hotspot ═══ The Hotspot is the pel where mouse input for an icon or pointer is directed. The default hotspot location is 16 x 16, the center of the icon or pointer. Bit maps do not have hotspots. Select Hotspot from the Options menu to designate this pel. The cursor changes shape, and the screen coordinates of the current hotspot are displayed in the information window. When you click on a new hotspot, the screen coordinates of the new hotspot are displayed. Select Hotspot again to return to editing. When an application uses WinQueryPointerPos to query the screen position of a pointer, the OS/2 operating system returns the coordinates of the pointer hot spot. ═══ 9.1.3.4. Selecting Colors ═══ Use the Palette to select a new drawing color, using the left or right mouse button. The currently selected color for the right mouse button is framed on the palette in red; the color for the left mouse button is framed in green. The currently selected colors for both mouse buttons are also displayed at the left side of the status area. Changing Palettes or Palette Colors To change palettes or palette colors, select the Palette menu. On the Palette menu, you can: o Select New to create a new palette. The default palette will appear for you to edit. o Select Open to open an existing palette. o Select Save to save your current palette. If it is a new palette, you will be prompted for a name. o Select Save As to save the palette under a different name. You will be prompted for a new name. o Select Edit Color to edit a color in your palette. o Select Swap colors to swap the colors of the left and right mouse buttons. A submenu will appear, asking whether you want to preserve these colors in your art. Unless you choose Preserve Figure, the colors in your art will be changed accordingly. o Select Set default palette to save the existing palette as your default palette. ═══ 9.2. Editing Palette Colors ═══ You can change the colors that appear on your palette. To edit palette colors, follow these steps: 1. Select the color to be edited with the mouse. A frame appears around it on the palette. 2. Select Edit color from the Palette menu. Shortcuts: o Double-click on the color to be edited. o To select a color that you have already used in your art, use Find color on the Tools menu. The Edit color window will appear. 3. You can change the way you define palette colors by checking Dynamic editing and Important and choosing between RGB and HSV terms. o Dynamic editing, when checked, will make your art change dynamically as you edit individual colors, so that you can see how the changes will affect your art. o Important, when checked, will require that the color be accurately rendered, without dithering (approximating the color). o Every color can be described numerically in either RGB or HSV terms. RGB As proportions of primary colors red, blue, and green HSV In terms of hue, saturation, and value To toggle between RGB and HSV, select the appropriate radio button. 4. Use the scroll bars to change RGB or HSV values, or change these numbers from the keyboard. 5. Select OK to save the edited color. ═══ 9.2.1. Filling Areas With Color ═══ There are two different ways to fill an area with color: o To fill an irregularly-shaped area with the current palette color, select Color fill from the Tools menu. After you click on a specific pel, all adjoining areas that are the same color as that pel will be colored with the selected color. o To fill a previously-selected area with the current palette color, select Fill from the Edit menu. You must first select an area. See Editing Art for information about Select and Select All. Note: To select a color that you have already used in your art, use Find color on the Tools menu. A question-mark-arrow cursor will appear. Click on a specific pel of that color, and that color is selected. ═══ 9.2.2. Creating Icons for Specific Displays ═══ Although the Icon Editor edits and saves a device-independent form of the icon, the Device menu enables you to create versions of the icon for specific display devices. The Device menu displays a choice of three functions: create a new device form, select an existing form, and delete a form. An independent form is automatically created when you create a new icon or pointer and all other forms are derived from it. If you select any of the other device forms listed in the menu, a new form is created for the specified device. The Custom option enables you to create an icon or pointer for any other device. Select List to view a list of all existing forms, including custom and standard forms. Any item on this list can be selected and edited or deleted. However, you must have at least one device-independent form. Select Add in the list dialog to add a new device form. Several icon bit maps can be saved in a single icon resource; when the icon is saved, all versions are saved with it in a format that includes a device resolution tag for each version. When the icon is loaded from a resource file, the display device resolution is matched against the device for which each device-dependent icon was intended. If a match is found, that icon is used. If no match is found, the application uses the device-independent icon, which always exists. Figure files can contain any of the following forms to support multiple devices: o Independent o CGA (2 colors) o EGA (16 colors) o VGA (16 colors) o XGA/8514 (256 colors) o XGA/8514 (16 colors) o XGA/8514 Small Color Form (16 colors) o XGA/8514 Small BW Form o Custom Device-dependent icons are icons that are designed for a particular display resolution. An application can display icons or bit maps in dialog boxes or windows. The file name extension depends on the type of resource you are creating. The Icon Editor produces a file with any of the following extensions: .ICO for icons .PTR for pointers .BMP for bit maps The .ICO, .PTR, or .BMP files must be referred to in the resource script file for your application. The external files containing icons, pointers, and bit maps are all referenced in the resource script file by single-line statements that have a similar format. For example: ICON ID_MAINWND myprog.ico /* Icon */ POINTER ID_PTR mypoint.ptr /* Pointer */ BITMAP ID_BMP mybtmp.bmp /* bit map */ ICON, POINTER, and BITMAP keywords identify the resource type. The resource type is followed by a symbolic name or integer identifier that is used by your application to identify the resource. For example, with ICON, the ID_MAINWND identifier can be used by the application in the control data parameter of the WinCreateWindow call (or as a parameter to the WinCreateStdWindow call) that creates the frame of the main window of your application. The OS/2 operating system then associates the icon with the main window. The symbolic name or identifier can be followed by any loading and memory options. The options are not used in the example, as it lets the options default. The last part of the statement is the file name and file type of the resource created by the Icon Editor. A fully qualified path name must be given if the file is not in the current directory. An icon that it used for a minimized application main window should have the same file name as the executable file of the application. ═══ 9.3. Using a Command Line ═══ If you start the Icon Editor from a command line, rather than from an icon, you have an additional option available. You can load more than one file at a time by specifying the files on the command line. For instance, the following command would load the two specified icons, a bit map, and a pointer: ICONEDIT Ruth.ico gurp.ico alex.bmp pamela.ptr If you specify multiple files when you start the Icon Editor from the command line, you can use the Next option on the File Menu to select the next file. This option is available only if you specify multiple files from the command line. ═══ 10. Link for Object and Library Files (LINK386) ═══ LINK386 is used to combine object files and standard library files into a single file: an executable file, a dynamic-link library, or a device driver. The output file from LINK386 is not constrained to specific memory addresses. Thus, the operating system can load and execute this file at any convenient address. LINK386 Input LINK386 uses the following files as input: o One or more object files that are linked with any optional library files to form the executable file. Object files usually have a .OBJ extension. LINK386 accepts object files compiled or assembled for 8088, 80286, 80386, 80486, or PENTIUM* microprocessors. Object files must be in the Object Module Format (OMF), which is based on the Intel* 8086 OMF, and Tool Interface Standards Portable Formats Specification. o One or more library files. The library files contain object modules that are linked to the object files to form the executable file. Library files usually have a .LIB extension. Library files are used to resolve external references in your object files. o A module definition file. The module definition file provides information to LINK386 about the executable file or dynamic link library file it is creating. The module definition file usually has a .DEF extension. LINK386 Output LINK386 can produce dynamic-link libraries (.DLL) and device drivers (.SYS), in addition to executable files (.EXE). For additional information, see Output Files. LINK386 displays all of its output messages on the standard output device. LINK386 Features LINK386 creates the executable file and map file in the current directory unless you enter an explicit path. LINK386 looks in several locations for object, library, and module-definition files. See Where LINK386 Looks for Files. File names are not case sensitive; for example, abc.exe and ABC.EXE refer to the same file. If you enter a file name without an extension, LINK386 adds a Default Filename Extension that depends on the type of file expected. If you leave a field blank (but define the field with a comma), LINK386 uses a default for the field. If you end the LINK386 command with a semicolon (;), LINK386 uses Filename Defaults for all remaining fields. If you do not give all file names or do not end the command line with a semicolon, LINK386 prompts you for the omitted files. ═══ 10.1. Starting LINK386 ═══ Some commands and applications call LINK386 for you, or you can run LINK386 by typing LINK386 at the operating-system prompt. Supply input to LINK386 by any of three methods: o Enter the input directly on the command line. o Respond to prompts generated by LINK386. o Put your input in a response file, and enter the file name on the command line. You can press Ctrl+C at any time to interrupt LINK386 and return to the operating system. To display LINK386 help, type LINK386 /? at the prompt. A copyright statement appears along with a list of valid LINK386 options. ═══ 10.1.1. Syntax ═══ LINK386 [options] objfiles [,exefile, mapfile, libraries, deffile] OR LINK386 @responsefile SYNTAX DEFINITIONS The LINK386 command line includes the following fields: Options modifying actions of LINK386. Options can appear anywhere on the command line except immediately after the commas used to separate fields. See Options and Using LINK386 Options. Object files to be linked. Separate multiple file names by plus (+) or space characters. At least one name must be entered. Library files can also be entered. See Entering Library Files as Object Files. Output of file. LINK386 produces either an executable file, a dynamic-link library, or a device driver. Map file created that lists modules in . Use the /M option to include public symbols in this file. Enter NUL if you do not want a map file. See List Public Symbols (/M). Standard or import (not dynamic-link) libraries to be used in resolving external references. Separate multiple file names by plus (+) or space characters. Some libraries are searched by default. You can also specify a path to a directory -- LINK386 will search for libraries in a path specified on the line before searching directories given by the LIB environment variable. See Linking with an Import Library, Default Libraries and Specifying Library Directories. Module definition file. SYNTAX EXAMPLES The following command links the object files FUN.OBJ, TEXT.OBJ, TABLE.OBJ, and CARE.OBJ. LINK386 searches for unresolved external references in the library file XLIB.LIB and in the default libraries. By default, the executable file is named FUN.EXE. LINK386 also produces a map file, FUNLIST.MAP. LINK386 FUN+TEXT+TABLE+CARE, ,FUNLIST, XLIB.LIB; The following command produces a map file named FUN.MAP because a comma appears as a placeholder for . LINK386 FUN,,; The next pair of command lines do not produce a map file because commas do not appear as placeholders for . LINK386 FUN,; LINK386 FUN; The following command links the files MAIN.OBJ, GETDATA.OBJ, and PRINTIT.OBJ into an executable file named MAIN.EXE. A map file named MAIN.MAP is also produced. LINK386 MAIN+GETDATA+PRINTIT, , MAIN; The following command links GETDATA.OBJ and PRINTIT.OBJ into an OS/2 dynamic-link library. MODDEF.DEF must contain a LIBRARY statement to produce the dynamic-link library. LINK386 GETDATA+PRINTIT,GETDATA.DLL, , MODDEF ═══ 10.1.2. Object Files ═══ LINK386 accepts object files compiled or assembled for the 8088, 80286, 80386,80486 or PENTIUM microprocessor. LINK386 also accepts standard library files. ═══ 10.1.3. Output Files ═══ LINK386 Can Produce Three Types of Output Files o Executable (.EXE) files that run under OS/2 protected mode LINK386 produces an executable file whenever you specify a module-definition file containing a NAME Statement. The module definition file should not have a LIBRARY Statement, VIRTUAL DEVICE Statement, or PHYSICAL DEVICE Statement; otherwise, a dynamic-link library or device driver is produced, as described below. o Dynamic-link library (.DLL) files A dynamic-link library is produced whenever you specify a module-definition file containing a LIBRARY statement. o Device driver (.SYS) files A virtual or physical device driver is produced whenever you specify a module-definition file containing the VIRTUAL DEVICE or PHYSICAL DEVICE statements. ═══ 10.1.4. Prompts ═══ LINK386 prompts you if any fields have not been entered on the Syntax or in a response file. For each prompt, simply enter the same input that you would enter on the command line and press Enter. Object Modules [.OBJ]: Run File [basename.EXE]: List File [NUL.MAP]: Libraries [.LIB]: Definitions File [NUL.DEF]: Special Features o To extend input to a new line, type a plus sign (+) as the last character on the current line. When the same prompt appears on a new line, you can continue. Do not, however, split a file name across lines. o To select the default response to a prompt, press Enter. The next prompt appears. o To select default responses to the current prompt and all remaining prompts, enter a semicolon (;). Note that at least one object file must be entered. o You can specify options anywhere on any response line, except before a comma at the end of a line of characters. If you want to specify more than one option, either group them at the end of a response, or specify them at the end of several responses. Each option must begin with a slash (/). ═══ 10.1.5. Response Files ═══ A response file is a text file used to provide input to LINK386. To use response file input for LINK386, type LINK386 @responsefile The @ symbol tells LINK386 that responsefile is the name of a response file. If the file is not in the working directory, you must specify the path. The field specifies the name of a file containing the same input that would be entered on the command line or entered in response to LINK386 prompts. In this file, each response should appear on a separate line or be separated from other responses by a comma. To operate LINK386 using a response file, you must first create a file that contains the responses you want LINK386 to process. You can give the file any name, and create it with any text editor. Special Features: o You can begin using a response file at any point on the LINK386 Syntax or at any LINK386 prompt. The response file should contain responses to all remaining fields or prompts. o If the file does not contain responses for all the prompts, LINK386 displays the appropriate prompt and waits for you to supply a response. End the response file with a semicolon. o You can use special characters in the response file the same way you would use them in responses entered at the keyboard. For example, you can extend input to a new line by using the plus sign (+) and choose default responses for all remaining prompts by using a semicolon (;). o LINK386 displays prompts and the entries from the response file on the screen. If the entry in the response file is not acceptable, LINK386 pauses and waits for you to enter an acceptable response. The "Run in Batch Mode (/BAT)" disables the prompt. o Options can appear anywhere in the response file. ═══ 10.1.5.1. Response File Example ═══ FUN TEXT TABLE CARE /DEBUG /MAP FUNLIST GRAF.LIB If the text file above were named FUN.LNK, the following command would use this file as a response file: LINK386 @FUN.LNK This would cause LINK386 to do the following: o Link the four object modules FUN, TEXT, TABLE, and CARE into an executable file named FUN.EXE o Generate the map file FUNLIST.MAP o Generate Debugging information o Include public symbols and addresses in the map file o Link any needed routines from the library file GRAF.LIB The response file in the following example instructs LINK386 to generate an executable file called FUN.EXE, and four object modules, FUN, SUN, RUN, and GAMES. If you specify the file name, FUNLIST, LINK386 will generate a map file named FUNLIST.MAP. Adding the /MAP option will cause LINK386 to include the public symbols of the application in the map file. fun+sun+run+game /map fun.exe funlist ; ═══ 10.1.6. Default Libraries ═══ Most compilers embed the names of needed libraries (called default libraries) in object files. LINK386 searches these libraries. Because of this, you need to explicitly enter library names only in the following cases: o You want to use additional libraries. o You are using a library not in the current directory and not in a directory specified by the LIB environment variable. See Where LINK386 Looks for Files. o You want to use a library other than the one specified in the object file. Explicitly entered libraries are always searched before default libraries. If an external reference is resolved by more than one library, the order of libraries on the command line determines which library is used. To ignore default libraries use the Ignore Default Libraries (/NOD). But be careful - most compilers expect their object files to be linked with default libraries. ═══ 10.1.7. Entering Library Files as Object Files ═══ You can enter library files in the field. Be sure to include the .LIB file name extension; otherwise, LINK386 assumes a .OBJ extension. With libraries entered in the field, LINK386 adds every module in the library to your output file. With libraries entered in the field, LINK386 adds only those required to resolve external references. The effect of entering a library this way is the same as if you had entered all of the library's module names into the field. ═══ 10.1.7.1. Specifying Library Directories ═══ LINK386 searches additional locations for libraries using the drive name or path specification in the field on the command line. You can specify up to 32 additional paths. If you give more than 32 paths, LINK386 ignores the additional paths without displaying an error message. ═══ 10.1.7.2. Where LINK386 Looks for Files ═══ When searching for an object, library, or module definition file, LINK386 looks in the following locations in this order: 1. The directory specified for the file if a path specification is included. Default Libraries do not include path specifications. 2. The current directory. 3. Any directories entered on the command line. 4. Any directories given by the LIB environment variable. If LINK386 cannot locate a file, it prompts you to enter the location. The "Run in Batch Mode (/BAT)" disables these prompts. ═══ 10.1.7.3. Library Search Example ═══ LINK386 Object Modules [.OBJ]: FUN TEXT TABLE CARE Run File [FUN.EXE]: List File [NUL.MAP]: Libraries [.LIB]: C:\TESTLIB\ NEWLIBV3 Definitions File [NUL.DEF]: This example links four object modules to create an executable file named FUN.EXE. LINK386 searches NEWLIBV3.LIB before searching the default libraries to resolve references. To locate NEWLIBV3.LIB and the default libraries, LINK386 searches the following locations in this order: 1. The current directory 2. The C:\TESTLIB\ directory 3. The locations given by the LIB environment variable ═══ 10.1.7.4. Filename Defaults ═══ If you do not enter a file name, LINK386 assumes a default: No options None (This field is required.) The base name of the first file in with the .EXE extension added The base name in with the .MAP extension added No libraries No module definition file ═══ 10.1.7.5. Default Filename Extension ═══ If you do not enter an extension, LINK386 uses a default extension, depending on the type of file. Object .OBJ Executable .EXE Map .MAP Standard Library .LIB Dynamic-Link Library .DLL Module Definition .DEF Overriding Default Extension Any time you explicitly enter an extension, it overrides the default extension. To specify a file name without an extension, just enter a period (.) after the file name. ═══ 10.2. Options ═══ The following is a summary of LINK386 options: /? Display Help /A[LIGNMENT] Align /BAS[E] Base /BAT[CH] Run in Batch Mode /C[ODEVIEW] Prepare for Debugging /DE[BUG] Prepare for Debugging /DO[SSEG] Order Segments /E[XEPACK] Exepack (You can add :1 or :2.) /EXEPACK Exepack /EXEPACK:1 Exepack /E:2 Exepack /E:1 Exepack /EXE:2 Exepack /EXEP Exepack /F[ARCALLTRANSLATION] Optimize Far Calls /H[ELP] Display Help /I[NFORMATION] Display Process Information /L[INENUMBERS] Include Line Numbers /M[AP] List Public Symbols /NOD[EFAULTLIBRARYSEARCH] Ignore Default Libraries /NOE[XTDICTIONARY] Ignore Extended Dictionary /NOF[ARCALLTRANSLATION] Disable Far Optimization /NOI[GNORECASE] Preserve Case Sensitivity /NOL[OGO] Disable Sign-On Banner /NON[ULLSDOSSEG] Order Segments without NULLs /NOO[UTPUTONERROR] Does not produce if an error occurs during linking. /NOS[ECTORALIGNCODE] Disable Automatic Sector Alignment code. /NOP[ACKCODE] Disable Code-Segment Packing /PACKC[PACKCODE] Combine Contiguous Code /PACKD[ATA] Combine Contiguous Data /PAU[SE] Pause during Linking /PM[TYPE] Name Application Type /RU[NFROMVDM] Allow Execution From DOS Command Line /SE[GMENTS] Set Max Number of Segments /ST[ACK] Control Stack Size /W[ARNFIXUP] Warn Fixup Options Not Supported Under LINK386 /O[VERLAYINTERRUPT] /CP[ARMAXALLOC] /PADC[ODE] /DS[ALLOCATE] /PADD[ATA] /Q[UICKLIB] /HI[GH] /T[INY] /INC[REMENTAL] /NOG[ROUPALIGN] Specifying LINK386 Options You can specify options anywhere on the response line, except before a comma at the end of a line of characters. If you want to specify more than one option, either group them at the end of a response, or specify them at the end of several responses. Each option must begin with a forward slash (/). ═══ 10.2.1. Using LINK386 Options ═══ 1. Options always begin with the slash character (/). 2. Options are not case sensitive. For example, /de and /DE are equivalent. 3. You can specify options in either the short or long form. The short form is the shortest sequence of characters that uniquely identifies the option. The individual description of each option lists both forms with the optional part enclosed in brackets. For example, /BAT[CH] indicates that either /BAT or /BATCH can be used. 4. Some linker options take numeric arguments. You can enter numbers in decimal, octal, or hexadecimal radix using standard C-language syntax. 5. You can also specify options in the LINK386 environment variable. 6. Although use of the minimum one-letter abbreviations is allowed, if a future release has an additional option starting with the same letter, the one-letter option will no longer be usable. ═══ 10.2.2. Recommendations ═══ It is recommended that the ALIGN:2, BASE, FARCALLTRANSLATION, RUNFROMVDM, and EXEPACK:2 options be used when linking all executables. This will compress them in size and improve their performance. If BASE is used with .EXE files, the /BASE:0x10000 option must be used. Any other value will produce a warning. ═══ 10.2.3. Entering Numeric Arguments ═══ Some LINK386 options and module statements take numeric arguments. LINK386 uses C-language syntax allowing you to specify numbers in any of the following forms: o Any number not prefixed with 0 or 0x is a decimal number. For example, 1234 is a decimal number. o Any number prefixed with 0 (but not 0x) is an octal number. For example, 01234 is an octal number. o Any number prefixed with 0x is a hexadecimal number. For example, 0x1234 is a hexadecimal number. ═══ 10.2.4. Environment Variable ═══ You can use the LINK386 environment variable to cause certain options to be used each time you link. LINK386 checks the environment variable for options if the variable exists. LINK386 expects to find options listed in the variable exactly as you would type them on the command line. It does not accept other kinds of arguments; file names in the environment variable cause the following error message: unrecognized option Each time you link, you can specify other options in addition to the ones specified in the LINK386 environment variable. If you type an option both on the Syntax and in the environment variable, the effect is the same as if the option were given once. Note: A command line option overrides the effect of any environment-variable option that it conflicts with. For example, the command line option /SE:512 cancels the effect of the environment-variable option /SE:256. The only way to prevent an option in the environment variable from being used is to reset the environment variable itself. ═══ 10.2.5. Environment Variable Example ═══ , LINK386 ignores only the default libraries in . In general, high-level-language programs do not work correctly without standard libraries. Thus, if you use the /NOD option, you should explicitly specify the name of a standard library in the field of the command line. ═══ 10.2.5.14. Ignore Extended Dictionary (/NOE) ═══ Syntax: /NOE[XTDICTIONARY] This option prevents LINK386 from searching the extended dictionary, an internal list of symbol locations included with libraries generated with the old LIB utility's /NOE option. Normally, LINK386 uses the extended dictionary to speed up library searches; thus, using /NOE slows LINK386. This option should be used when a library symbol is redefined. You need to use this option when LINK386 issues error L2044. ═══ 10.2.5.15. Disable Far Optimization (/NOF) ═══ Syntax: /NOF[ARCALLTRANSLATION] Far-call optimization is off by default. If the LINK386 environment variable or another command (such as ICC) has turned it on, you can use /NOF to turn it off again. ═══ 10.2.5.16. Preserve Case Sensitivity (/NOI) ═══ Syntax: /NOI[GNORECASE] This option turns case sensitivity on; that is, LINK386 treats ABC, abc, and Abc as unique names. By default, case sensitivity is off. This option can be used when you link programs written in case-sensitive languages such as C. ═══ 10.2.5.17. Disable Sign-On Banner (/NOL) ═══ Syntax: /NOL[OGO] This option disables the sign-on banner displayed when LINK386 starts. ═══ 10.2.5.18. Order Segments without NULLs (/NON) ═══ Syntax: /NON[ULLSDOSSEG] This option arranges segments in a special order. The /NON option is equivalent to the Order Segments (/DO) except that /NON does NOT insert 16 null bytes at the beginning of the _TEXT segment (if this segment is defined). The /NON option overrides the /DO option when both are used. Therefore, you can use /NON to override the /DO comment record commonly found in standard libraries. ═══ 10.2.5.19. No Output on Error (/NOO) ═══ Syntax: /NOO[UTPUTONERROR] This option will keep Link386 from creating the executable if an error is encountered. ═══ 10.2.5.20. Disable Code-Segment Combining (/NOP) ═══ Syntax: /NOP[ACKCODE] This option turns code segment combining off. By default, code segment combining is on. ═══ 10.2.5.21. Disable Sector Alignment of Code (/NOS) ═══ Syntax: /NOS[ECTORALIGNCODE] Link386 will align passes of code on sector (512 bytes) boundaries. This helps reduce the time to load the passes. The /NOSECTORALIGNCODE option is provided to turn off this feature. Pages of code would then be aligned based on the /ALIGN value. ═══ 10.2.5.22. Combine Contiguous Code (/PACKC) ═══ Syntax: /PACKC[ODE]:number This option groups neighboring code segments. Neighboring code segments are assigned the same segment address, and offsets to each routine are adjusted upward as required. This option is on by default and is used only when you wish to override an environment variable that has turned code combining off. See Environment Variable and Disable Code-Segment Combining (/NOP) The field specifies the maximum size of a code segment grouped by /PACKC. If you do not use the /PACKC option or if you omit , maximum size defaults to 65530. LINK386 stops adding segments to a group as soon as it cannot add another segment without exceeding . At this point, LINK386 forms a new segment. See Entering Numeric Arguments. Code combining generally produces slightly faster and more compact code. Use the Optimize Far Calls (/F) option to provide the maximum opportunity for combining. ═══ 10.2.5.23. Combining Contiguous Data (/PACKD) ═══ Syntax: /PACKD[ATA] [:number] This option groups neighboring data segments. It functions like the Combine Contiguous Code (/PACKC) option, except that it combines data segments. The field specifies the maximum size of a data segment grouped by /PACKD; if you omit , the maximum size defaults to 65,536. LINK386 stops adding segments to a group as soon as it cannot add another segment without exceeding . At this point, LINK386 forms a new group. See Entering Numeric Arguments. ═══ 10.2.5.24. Pause during Linking (/PAU) ═══ Syntax: /PAU[SE] This option makes LINK386 pause before writing the output file to disk. The pause allows you to swap disks. With this option, LINK386 displays the following message before it creates the output file: About to generate .EXE file Change diskette in drive letter and press Enter LINK386 writes the output file when you press Enter. Be sure not to remove a disk containing the map file. If the disk you need to swap contains either of these files, press CTRL+C to terminate the LINK386 session, rearrange your files, and link again. ═══ 10.2.5.25. Name Application Type (/PM) ═══ Syntax: /PM[TYPE]:type This option specifies the type of application being generated. Using the /PM option is equivalent to including a NAME statement in the module definition file. A keyword in is equivalent to a keyword in a NAME statement as shown in the following list: PM WINDOWAPI VIO WINDOWCOMPAT NOVIO NOTWINDOWCOMPAT ═══ 10.2.5.26. Execute from DOS Command Line (/RU) ═══ Syntax: /RU[NFROMVDM]: This option allows the program to be executed from a DOS command line, if possible. This option causes LINK386 to insert an alternate DOS stub into the program. The DOS stub is executed if a protect mode program is executed from a DOS command line. The default DOS stub simply prints an error message and returns to the DOS command line. The alternate DOS stub will attempt to start the program in protect mode. ═══ 10.2.5.27. Set Maximum Number of Segments (/SE) ═══ Syntax: /SE[GMENTS]:number This option sets the number of logical segments a program can have. You can set to any value in the range 1 to 3,072. See Entering Numeric Arguments. For each logical segment, LINK386 must allocate space to keep track of segment information. By using a relatively low segment limit as a default (128), LINK386 is able to link faster and allocate less storage space. When you set the segment limit higher than 128, LINK386 allocates more space for segment information. This option allows you to raise the segment limit for programs with a large number of segments. For programs with fewer than 128 segments, you can keep the storage requirements of LINK386 at the lowest level possible by setting the segment field to reflect the actual number of segments in the program. If the number of segments allocated is too high for the amount of memory LINK386 has available to it, you see the error message segment limit too high. To specify a number of segments that fits in the amount of memory available, set the segment lower and relink. ═══ 10.2.5.28. Control Stack Size (/ST) ═══ Syntax: /ST[ACK] :number This option controls the stack size (in bytes) of your program. You can specify any positive value for . See Entering Numeric Arguments. If your program generates a stack-overflow message, you can increase the size of the stack. In contrast, if your program uses the stack very little, you may save some space by decreasing the stack size. ═══ 10.2.5.29. Warning of Fix-ups (/W) ═══ Syntax: /W[ARNFIXUP] This option directs LINK386 to issue a warning for each segment-relative fix-up of location-type offset when the segment is contained within a group, but not at the beginning. LINK386 includes the displacement of the segment from the group in determining the final value of the fix-up. ═══ 10.2.6. /INF and /M Output Example ═══ The following is a sample of LINK386 output when Display Process Information (/I) and List Public Symbols (/M) options are specified: **** PASS ONE **** TEST.OBJ(test.for) **** LIBRARY SEARCH **** LLIBFOR7.LIB(wr) LLIBFOR7.LIB(fmtout) LLIBFOR7.LIB(ldout) │ │ │ **** ASSIGN ADDRESSES **** 1 segment "TEST_TEXT" length 122H bytes 2 segment "_DATA" length 912H bytes 3 segment "CONST" length 12H bytes │ │ │ **** PASS TWO **** TEST.OBJ(test.for) LLIBFOR7.LIB(wr) LLIBFOR7.LIB(fmtout) LLIBFOR7.LIB(ldout) │ │ │ **** WRITING EXECUTABLE **** ═══ 10.2.7. OS/2 Considerations ═══ In most respects, linking a program for OS/2 is similar to linking a program for DOS. The principal difference is that most programs created for DOS run as stand-alone applications, whereas programs for OS/2 generally call one or more dynamic-link libraries. See What Is a Dynamic-Link Library? and Advantages of Dynamic Linking. Import and Export Definitions Each dynamic-link library (.DLL file) defines export definitions that tell OS/2 what functions the library has. Functions not exported can only be called from within the library. Each export definition specifies a function name. Conversely, each executable program (.EXE file) defines import definitions that tell OS/2 which dynamic-link functions the program needs and where they can be found. Otherwise, OS/2 would not know which dynamic-link libraries to load when the program is run. Each import definition specifies a function name and the .DLL file where the function resides. Methods of OS/2 Linking There are two methods of OS/2 Linking: o Linking without an Import Library o Linking with an Import Library Linking with an import library requires more steps but has certain advantages. ═══ 10.2.7.1. What Is a Dynamic-Link Library? ═══ A dynamic-link library contains executable code for common functions, just as an ordinary library does. Yet code for functions in dynamic-link libraries is not copied into the executable (.EXE) file. Instead, the library itself is loaded into memory at run time, along with the .EXE file. ═══ 10.2.7.2. Advantages of Dynamic Linking ═══ Dynamic-link libraries serve much the same purpose that standard libraries do, but they also have the following advantages: o Applications link more quickly. With dynamic linking, the executable code for a dynamic-link function is not copied into the .EXE file of the application. Instead, only an import definition is copied. o Applications require less disk space. With dynamic linking, several different program applications can access the same dynamic-link function stored in one place. Without dynamic linking, the code for the function would be repeated in every .EXE file. o Libraries and applications are independent. Dynamic-link libraries can be updated any number of times without relinking the applications that use them. If you are a user of third-party libraries, this is particularly convenient. You receive the updated .DLL file from the third-party developers, and you only need to copy the new library onto your disk. At run time, your applications automatically call the updated library functions. o Code and data segments can be shared. Code and data segments loaded from a dynamic-link library can be shared. Without dynamic linking, such sharing is not possible because each file has its own copy of all the code and data it uses. By sharing segments with dynamic linking, you can use memory more efficiently. ═══ 10.2.7.3. Linking without an Import Library ═══ The figure below illustrates a simple case in which you create an application that uses a single dynamic-link library (.DLL) file. ┌──────────┐ ┌─────────┐ ┌─────────┐ ┌──────────┐ │ .OBJ and │ │.DEF file│ │.DEF file│ │ .OBJ and │ │.LIB files│ │(LIBRARY)│ │(imports)│ │.LIB files│ │ │ │(exports)│ │ │ │ │ └────┬─────┘ └────┬────┘ └────┬────┘ └─────┬────┘ │ │ │ │ └──────┬──────┘ └──────┬──────┘ │ │   (1) LINK386 (2) LINK386   │ │ ┌────┴────┐ ┌──────┴──────┐ │.DLL file│ │ .EXE file │ │(library)│ │(application)│ └─────────┘ └─────────────┘ As depicted above, linking occurs in two steps: 1. Object files (and standard libraries if any) are linked with a module definition (.DEF) file to create a .DLL file. A .DEF file is used that defines all functions exported by the .DLL file. 2. Object files (and standard libraries, if any) are linked with a .DEF file to create an application (.EXE) file. A different .DEF file is used for this step; it defines all dynamic-link functions imported (used) by the application. ═══ 10.2.7.4. Linking with an Import Library ═══ The figure below illustrates a simple case in which you create an application that uses a single dynamic-link library (.DLL) file. ┌──────────┐ ┌─────────┐ ┌─────────┐ ┌──────────┐ │ .OBJ and │ │.DEF file│ │.LIB file│ │ .OBJ and │ │.LIB files│ │(LIBRARY)│ │(imports)│ │.LIB files│ │ │ │(exports)│ │ │ │ │ └────┬─────┘ └──┬───┬──┘ └──┬───┬──┘ └────┬─────┘ │ │ │ │ │ │ └──────┬─────┘ │  └─────┬─────┘ │ └─(2) IMPLIB─┘ │   (1) LINK386 (3) LINK386   │ │ ┌────┴────┐ ┌──────┴──────┐ │.DLL file│ │ .EXE file │ │(library)│ │(application)│ └─────────┘ └─────────────┘ As depicted above, linking occurs in three steps: 1. Object files (and dynamic-link libraries) are linked with a module definition (.DEF) file to create a .DLL file. A .DEF file is used that defines all functions exported by the .DLL file. 2. The IMPLIB program is used to generate an import library (.LIB) file. IMPLIB takes as input the same module definition file used in the first step. For each export definition in the .DEF file, IMPLIB generates a corresponding import definition. (IMPLIB can also use the .DLL file generated in step 1 if you use the _export keyword in C declarations to export functions.) 3. The .LIB file generated by IMPLIB is used as input to LINK386, which creates an application (.EXE) file. This .LIB file provides LINK386 with information about imported dynamic-link functions. ═══ 10.2.8. Module Definition Files Basics ═══ What Is a Module Definition File? A module definition file describes the names, attributes, exports, imports, and other characteristics of an application or library. You must use module definition files to create most applications for OS/2. You must use module definition files to create all OS/2 dynamic-link libraries and device drivers. Module Statements A module definition file contains one or more Module Statements These statements: o Define various attributes of the executable file o Define attributes of code and data segments o Identify functions that are imported or exported ═══ 10.2.8.1. Module Definition File Example ═══ The following module definition file gives module definitions for a dynamic-link library. It includes one source level comment and five statements. ; Sample module-definition file LIBRARY DESCRIPTION 'Sample .DEF file for a dynamic-link library' CODE PRELOAD STACKSIZE 1024 EXPORTS Init @1 Begin @2 Finish @3 Load @4 Print @5 ═══ 10.2.8.2. Module Statement Rules ═══ o If you use a NAME, LIBRARY, VIRTUAL DEVICE, or PHYSICAL DEVICE statement, it must precede all other statements in the module definition file. o You can include source level comments in the module definition file by beginning a line with a semicolon (;). Such lines are ignored. o All module definition keywords (such as NAME, LIBRARY, and OLD) must be entered in uppercase letters. ═══ 10.2.9. Module Statements ═══ LINK386 has the following module definition file statements: BASE Base CODE Gives default attributes for code segments DATA Gives default attributes for data segments DESCRIPTION Describes the module EXETYPE Identifies operating system EXPORTS Defines exported functions IMPORTS Defines imported functions HEAPSIZE Specifies local heap size LIBRARY Names dynamic-link library NAME Names application OLD Preserves import information PHYSICAL DEVICE Names physical device driver PROTMODE Specifies DOS protected mode SEGMENTS Gives attributes for specific segments STACKSIZE Specifies local stack size STUB Adds DOS executable file to module VIRTUAL DEVICE Names virtual device driver ═══ 10.2.10. BASE Statement ═══ Syntax: BASE=n Where n is a value rounded up to the nearest multiple of 64K Indicates that each object of the module has a preferred load address starting with object 1 at this address, object 2 at the next available multiple of 64K, and so on. Internal relocation records are then applied using this addressing scheme. If the module's objects can be loaded beginning at this preferred address, then no load-time internal relocation records need be applied. If the module's objects cannot be loaded beginning at this preferred address, then the internal relocation records that have been retained in the file data will be applied. EXE files may specify a base address, but it must be 64K. If it isn't, a warning will be issued and a base address of 64K will be used anyway. ═══ 10.2.11. CODE Statement ═══ Syntax: CODE [attribute...] This statement defines the default attributes for code segments within the application or library. One or more attributes can appear following the CODE statement: PRELOAD or LOADONCALL Sets when code segment is loaded Note: OS/2 2.x ignores the preload attribute. EXECUTEONLY or EXECUTEREAD Sets read/execute status IOPL or NOIOPL Sets I/O privilege CONFORMING or NONCONFORMING Determines segment conformance Attribute Rules: o Only one attribute from each pair appears. If you specify neither attribute from a pair, LINK386 supplies the default, listed second in each pair above. o Attributes can appear in any order. Example The following example sets defaults for module code segments so they have I/O hardware privilege and are not loaded until accessed. CODE LOADONCALL IOPL ═══ 10.2.11.1. Load Code Attributes ═══ These attributes determine when a code segment is loaded: PRELOAD The segment is loaded automatically when the program starts. Note: OS/2 2.x ignores the preload attribute. LOADONCALL The segment is not loaded until accessed (default). ═══ 10.2.11.2. Read/Execute Code Attributes ═══ These attributes determine whether a code segment can be read as well as executed: EXECUTEONLY The segment can only be executed. EXECUTEREAD The segment can be both executed and read (default). ═══ 10.2.11.3. I/O Privilege Code Attributes ═══ I/O privilege code attributes determine whether a segment has I/O privilege (that is, whether it can access the hardware directly): IOPL The code segment has I/O privilege. NOIOPL The code segment does not have I/O privilege (default). ═══ 10.2.11.4. Conforming Code Attributes ═══ These attributes specify whether a code segment is a conforming segment: CONFORMING The segment is conforming. NONCONFORMING The segment is nonconforming (default). The concept of a conforming segment has to do with privilege level (the range of instructions that the process can execute) and is relevant only when you are writing device drivers and system level code. A conforming segment can be called from either Ring 2 or Ring 3, and the segment executes at the privilege level of the caller. ═══ 10.2.12. DATA Statement ═══ Syntax: DATA [attribute...] This statement defines the default attributes for data segments within the application or library. One or more attributes can appear following the DATA statement: PRELOAD or LOADONCALL Sets when data segment is loaded Note: OS/2 2.x ignores the preload attribute. READONLY or READWRITE Sets read/write access NONE, SINGLE, or MULTIPLE Sets sharing attributes IOPL or NOIOPL Sets I/O privilege SHARED or NONSHARED Determines whether segment is shared Attribute Rules o Only one attribute out of each group appears; if you specify none of the attributes in a group, the last attribute listed above for that group is generally the default. (The defaults for NONE/SINGLE/MULTIPLE and SHARED/NONSHARED vary depending on whether you are describing a dynamic-link library or application.) o Attributes can appear in any order. Example The following example defines the application data segment so that it is loaded only when it is accessed and cannot be shared by more than one copy of the program. By default, the data segment can be read and written, the automatic data segment is copied for each instance of the module, and the data segment has no I/O privilege. DATA LOADONCALL NONSHARED ═══ 10.2.12.1. Load Data Attributes ═══ These attributes determine when a data segment is loaded: PRELOAD The segment is loaded automatically when the program starts. Note: OS/2 2.x ignores the preload attribute. LOADONCALL The segment is not loaded until accessed (default). ═══ 10.2.12.2. Read/Write Data Attributes ═══ These attributes determine the access rights to a data segment: READONLY The segment can only be read. READWRITE The segment can be both read and written to (default). ═══ 10.2.12.3. Sharing Data Attributes ═══ These attributes determine how the automatic data segment can be shared: NONE No automatic data segment is created. SINGLE A single automatic data segment is shared by all instances of the module. In this case, the module is said to have solo data. This keyword is the default for dynamic-link libraries. MULTIPLE The automatic data segment is copied for each instance of the module. In this case, the module is said to have instance data. This keyword is the default for applications. The automatic data segment is the physical segment represented by the group name DGROUP. This segment group makes up the physical segment that contains the local stack and heap of the application. ═══ 10.2.12.4. LINK386 -I/O Privilege Data Attributes ═══ These attributes determine whether data segments have I/O privilege (that is, whether they can access the hardware directly): IOPL The data segments have I/O privilege. NOIOPL The data segments do not have I/O privilege (default). ═══ 10.2.12.5. Shareable Data Attributes ═══ These attributes determine whether all instances of the program can share a READWRITE data segment: SHARED One copy of the data segment is loaded and shared among all processes accessing the module (default for dynamic-link libraries). NONSHARED The segment cannot be shared, and must be loaded separately for each process (default for applications). Under OS/2, this field is ignored if READONLY is specified, since READONLY data segments are always shared. ═══ 10.2.13. SEGMENTS Statement ═══ Syntax: SEGMENTS segmentdefinitions This statement defines the attributes of one or more segments in the application or library on a segment-by-segment basis. The attributes specified by this statement override defaults set in CODE and DATA statements. The SEGMENTS keyword marks the beginning of the segment definitions. This keyword can be followed by one or more segment definitions, each on a separate line (limited by the number set by the LINK386 /SE option, or 128 if the option is not used). See Set Maximum Number of Segments (/SE). Segment-Definition Syntax ['] segmentname ['] [CLASS 'classname'][attribute...] Each segment definition begins with , optionally enclosed in single quotation marks ('). The quotation marks are required if conflicts with a module definition keyword, such as CODE or DATA. The CLASS keyword specifies the class of the segment. Single quotation marks (') are required for . If you do not use the CLASS argument, LINK386 assumes that the class is CODE. One or more attributes can follow. The default attribute is listed last. PRELOAD or LOADONCALL Determines when segment is loaded Note: OS/2 s.x ignores the preload attribute. READONLY or READWRITE Sets read/write access EXECUTEONLY or EXECUTEREAD Sets read/execute status IOPL or NOIOPL Sets I/O privilege CONFORMING or NONCONFORMING Determines conformance MIXED1632 Specify Mixed 16 and 32-Bit Segments ALIAS Specify that segment is aliased SHARED or NONSHARED Specify that segment is shared Attribute Rules o Only one attribute from each pair appears. If you specify neither attribute from a pair, LINK386 supplies the default (listed second in each pair above). o Attributes can appear in any order. Example SEGMENTS cseg1 CLASS 'mycode' IOPL cseg2 EXECUTEONLY PRELOAD CONFORMING dseg CLASS 'data' LOADONCALL READONLY This example specifies segments named cseg1, cseg2, and dseg. The first segment is assigned class mycode and the second is assigned CODE by default. Each segment is given different attributes. ═══ 10.2.13.1. Load Segments Attributes ═══ These attributes determine when a segment is loaded: PRELOAD The segment is loaded automatically when the program starts. Note: OS/2 2.x ignores the preload attribute. LOADONCALL The segment is not loaded until accessed (default). ═══ 10.2.13.2. Read/Write Segments Attributes ═══ These attributes determine the access rights to a data segment: READONLY The segment can only be read. READWRITE The segment can be both read and written to (default). ═══ 10.2.13.3. Read/Execute Segments Attributes ═══ These attributes determine whether a code segment can be read as well as executed: EXECUTEONLY The segment can only be executed. EXECUTEREAD The segment can be both executed and read (default). ═══ 10.2.13.4. I/O Privilege Segments Attributes ═══ These attributes determine whether a segment has I/O privilege (that is, whether it can access the hardware directly): IOPL The segment has I/O privilege. NOIOPL The segment does not have I/O privilege (default). ═══ 10.2.13.5. Conforming Segments Attributes ═══ These attributes specify whether a code segment is a conforming segment: CONFORMING The segment is conforming. NONCONFORMING The segment is nonconforming (default). The concept of a conforming segment has to do with privilege level (the range of instructions that the process can execute). Conforming attributes are relevant only when you are writing device driver and system-level code. A conforming segment can be called from either Ring 2 or Ring 3, and the segment executes at the privilege level of the caller. ═══ 10.2.13.6. Specify Mixed 16 and 32-Bit Segments ═══ Sometimes it is necessary to mix 16-bit code with 32-bit code. When you must create groups that allow such mixing, LINK386 requires that you declare the segments in that group as MIXED1632. ═══ 10.2.13.7. Specify that Segment is Aliased ═══ Segments flagged with the ALIAS keyword can be addressed using the 16-bit segmented method (_far16), or the 32-bit linear method. The loader must prepare an additional segment selector for each segment designated with the ALIAS keyword. This new segment selector allows for 16-bit addressing. Example: SEGMENTS _CODE ALIAS The statement above specifies that the segment _CODE can be called using 16-bit far calls and 32-bit near calls. ═══ 10.2.13.8. Specify that Segment is Shared ═══ These attributes determine if the segment can be shared by other processes. SHARED One copy of the data segment is loaded and shared among all processes accessing the module (default for dynamic-link libraries). NONSHARED The segment cannot be shared, and must be loaded separately for each process (default for applications). ═══ 10.2.14. DESCRIPTION Statement ═══ Syntax: DESCRIPTION 'text' This statement inserts the specified text into the application or library. The DESCRIPTION statement is useful for embedding source control or copyright information into an application or library. The field is a one line string enclosed in single quotation marks. Example The following example inserts the text Template Program into the application or library being defined. DESCRIPTION 'Template Program' ═══ 10.2.15. EXETYPE Statement ═══ Syntax: EXETYPE [OS2 | WINDOWS | UNKNOWN] This statement specifies under which operating system the application (or dynamic-link library) is to run. This statement is optional and provides an additional degree of protection against the program being run in an incorrect operating system. The EXETYPE keyword can be followed by a descriptor of the operating system: OS2 OS/2 applications and dynamic-link libraries (default) WINDOWS Windows** applications UNKNOWN Other applications The effect of EXETYPE is to set bits in the header that identify operating-system type. Operating-system loaders can check these bits. ═══ 10.2.16. EXPORTS Statement ═══ Syntax: EXPORTS exportdefinitions This statement defines the names and attributes of the functions exported to other modules and of the functions that run with I/O privilege. Note: The term export refers to the process of making a function available to other run-time modules. By default, functions are hidden from other modules at run time. Normally, the EXPORTS statement is meaningful only for functions within dynamic-link libraries and for functions that execute with I/O privilege. The EXPORTS keyword marks the beginning of the export definitions. Each definition is entered on a separate line. You need to give an export definition for each dynamic-link routine you want to make available to other modules. Export-Definition Syntax entryname [=internalname] [@ord[RESIDENTNAME]] [pwords] The function name as it is known to other modules. The actual name of the export function as it appears within the module itself; by default, this name is the same as . The function's ordinal position within the module definition table. If this field is used, the function's entry point can be invoked by name or by ordinal. Use of ordinal positions is faster and may save space. RESIDENTNAME Indicates that the function's name be kept resident in memory at all times. This keyword is applicable only if is used. If is not used, OS/2 automatically keeps the names of all exported functions resident in memory by default. The total size of the function's parameters, as measured in words (bytes divided by two). This field is required only if the function executes with I/O privilege. When a function with I/O privilege is called, OS/2 consults to determine how many words to copy from the caller's stack to the I/O-privileged function's stack. Example EXPORTS SampleRead = read2bin @8 StringIn = str1 @4 RESIDENTNAME CharTest 6 This example defines three export functions: o SampleRead o StringIn o CharTest The first two functions can be accessed either by their exported names or by an ordinal number. Note that in the module's own source code, these functions are actually defined as read2bin and str1, respectively. The last function runs with I/O privilege and therefore is given with the total size of the parameters - six words. ═══ 10.2.17. IMPORTS Statement ═══ Syntax: IMPORTS importdefinitions This statement defines the names of the functions imported for the application or library. Note: The term import refers to the process of declaring that a symbol is defined in another run-time module (a dynamic-link library). Typically, LINK386 uses an import library to resolve external references to dynamic-link symbols. However, the IMPORTS statement provides an alternative for resolving these references within a module. The IMPORTS keyword marks the beginning of the import definitions. This keyword is followed by one or more import definitions, each on a separate line. Each import definition corresponds to a particular function. Import-Definition Syntax [internalname=]modulename.entry The name that the importing module uses to call the function. Thus, appears in the source code of the importing module, although the function can have a different name in the module where it is defined. By default, internalname is the same as . The name of the application or library that contains the function. The function to be imported; can be a name or an ordinal value. (Ordinal values are set in an EXPORTS statement.) If an ordinal value is given, then is required. Note: A given function has a name for each of three different contexts. The function has a name used by the exporting module (where it is defined), a name used as an entry point between modules, and a name as it is used by the importing module (where it is called). If neither module uses the optional field, the function has the same name in all three contexts. If either of the modules uses the field, the function may have more than one distinct name. Syntax: IMPORTS Sample.SampleRead SampleA.SampleWrite ReadChar = Read.1 This example defines three functions to be imported: o SampleRead o SampleWrite o A function that has been assigned an ordinal value of 1 The functions are found in the modules Sample, SampleA, and Read, respectively. The function from the Read module is referred to as ReadChar in the importing module. The original name of the function, as it is defined in the Read module, may or may not be known. ═══ 10.2.18. HEAPSIZE Statement ═══ Syntax: HEAPSIZE bytes | MAXVAL This statement defines the size of the application's local heap in bytes. This value affects the size of the automatic data segment. The field contains any positive integer. You can enter in decimal, octal, or hexadecimal radix. See Entering Numeric Arguments. Instead of entering a number for , you can enter the keyword MAXVAL. This sets the heap size such that the default data segment DGROUP is exactly 64K. MAXVAL is useful in bound applications in which you want to force a 64K requirement for DGROUP. Example HEAPSIZE 4000 This example sets the local heap to 4,000 bytes. ═══ 10.2.19. LIBRARY Statement ═══ Syntax: LIBRARY [libraryname][initialization] [termination] This statement identifies the executable file as a dynamic-link library and optionally defines the name and library module initialization required. If is given, it becomes the name of the library as it is known by OS/2. This name can be any valid file name. If is not given, the name of the executable file - with the extension removed - becomes the name of the library. If is given, it defines the library initialization required and can be one of the values below. If omitted, defaults to INITGLOBAL. INITGLOBAL The library initialization routine is called only when the library module is initially loaded into memory. Using this keyword without a termination flag implies TERMGLOBAL for DLLs with 32-bit entry points. INITINSTANCE The library initialization routine is called each time a new process gains access to the library. Using this keyword without a termination flag implies TERMINSTANCE for DLLs with 32-bit entry points. If is given, it defines the library termination required and can be one of the values below. If omitted, defaults to TERMGLOBAL. The termination flag can only apply to DLLs with 32-bit entry points. TERMGLOBAL The library termination routine is called only when the library module is unloaded from memory. Using this keyword without an initialization flag implies INITGLOBAL. TERMINSTANCE The library termination routine is called each time a process relinquishes access to the library. Using this keyword without an initialization flag implies INITINSTANCE. If the LIBRARY statement is included in a module definition file, the NAME statement cannot appear. If no LIBRARY statement appears, the module definition file describes an application. The following example assigns the name calendar to the dynamic-link library and specifies that library initialization be performed each time a new process gains access. LIBRARY calendar INITINSTANCE ═══ 10.2.20. NAME Statement ═══ Syntax: NAME [appname][apptype] This statement identifies the executable file as an application and optionally defines the name and type. If is given, it becomes the name of the application as it is known by OS/2. This name can be any valid file name. If is not given, the name of the executable file - with the extension removed - becomes the name of the application. If is given, it defines the type of application: WINDOWAPI Presentation Manager* application. The application uses the API provided by the Presentation Manager and must be executed in the Presentation Manager environment. WINDOWCOMPAT Application compatible with Presentation Manager. The application can run inside the Presentation Manager, or it can run in a separate screen group. An application can be of this type if it uses the proper subset of OS/2 video, keyboard, and mouse functions supported in the Presentation Manager applications. NOTWINDOWCOMPAT Application that is not compatible with the Presentation Manager and must operate in a separate screen group from the Presentation Manager. If the NAME statement appears, the LIBRARY, VIRTUAL DEVICE and PHYSICAL DEVICE statements cannot appear. If none of these statements appear, the module definition file is assumed to describe an application. Example The following example assigns the name calendar to the application being defined. NAME calendar WINDOWCOMPAT This application is Presentation Manager-compatible. ═══ 10.2.21. OLD Statement ═══ Syntax: OLD 'filename' This statement directs LINK386 to search another dynamic-link module for export ordinals. Exported names in the current module that match exported names in the OLD module are assigned ordinal values from that module unless one of the following conditions is in effect: o The name in the OLD module has no ordinal value assigned. o An ordinal value is explicitly assigned in the current module. This statement is useful for preserving export ordinal values throughout successive versions of a dynamic-link module. The OLD statement has no effect on application modules. ═══ 10.2.22. PHYSICAL DEVICE Statement ═══ Syntax: PHYSICAL DEVICE [drivername] This statement identifies the executable file as a physical device driver. If is given, it becomes the name of the driver as it is known by OS/2. This name can be any valid file name. If is not given, the name of the executable file - with the extension removed - becomes the name of the driver. ═══ 10.2.23. PROTMODE Statement ═══ Syntax: PROTMODE This statement specifies that the module runs only in protected mode and not in Windows or dual mode. This statement is always optional and permits a protected mode only application to omit some information from the executable file header. If this statement is not included in the module definition file, LINK386 assumes the application can be run in either real or protected mode. ═══ 10.2.24. STACKSIZE Statement ═══ Syntax: STACKSIZE number This statement performs the same function as the LINK386 /ST option; if both are used, the STACKSIZE statement overrides the /ST option. See Control Stack Size (/ST). The field contains a positive integer. You can specify in decimal, octal, or hexadecimal radix. See Entering Numeric Arguments. Example STACKSIZE 4096 This example allocates 4,096 bytes of local-stack space. ═══ 10.2.25. STUB Statement ═══ Syntax: STUB 'filename' This statement adds a DOS executable file to the beginning of the application or library being created. The stub is invoked whenever the module is executed under DOS. Typically, the stub displays a message and terminates execution. By default, LINK386 adds its own standard stub for this purpose. The field specifies the DOS executable file to be added. LINK386 looks for in the current directory and in the directories specified by the PATH environment variable. Example STUB 'STOPIT.EXE' This example appends the DOS executable file STOPIT.EXE to the beginning of the module. STOPIT.EXE is executed when the module is run under DOS. ═══ 10.2.26. VIRTUAL DEVICE Statement ═══ Syntax: VIRTUAL DEVICE [drivername] This statement identifies the executable file as a virtual device driver. If is given, it becomes the name of the driver as it is known by OS/2. This name can be any valid file name. If is not given, the name of the executable file - with the extension removed - becomes the name of the driver. ═══ 11. Make Message File (MKMSGF) ═══ The MKMSGF program reads the input message file that you specify and creates an output message file that DosGetMessage uses to display messages. There are two ways that the output message file can be used: o Selected messages can be bound to the message segment of an executable file using the MSGBIND program. o Messages can be accessed directly from the output message file. See How Message Retrieval Works for additional information. ═══ 11.1. Syntax ═══ MKMSGF infile outfile [options] OR MKMSGF @controlfile The infile field specifies the input file that contains message definitions. The input-file name can be any valid OS/2 file name, optionally preceded by a drive letter and a path. The outfile field specifies the output file created by MKMSGF. The output-file name can be any valid OS/2 file name, optionally preceded by a drive letter and a path. To differentiate between the two files, the following convention is recommended, using the same file name. o The infile file should have a .TXT extension. o The outfile file should have a .MSG extension. Note: The output file cannot have the same file name and extension as the input file. ═══ 11.1.1. Help ═══ There are two ways to display MKMSGF help. Short Syntax Help To display a short version of MKMSGF syntax help, type MKMSGF at the prompt, with no parameters. The following will be displayed: MKMSGF infile[.ext] outfile[.ext] [/V] [/D ] [/P ] [/L ] Long Help To display a longer version of MKMSGF help, including defaults, country codes, and language IDs, type MKMSGF /? at the prompt. The following will be displayed: Use MKMSGF as follows: MKMSGF [/V] [/D ] [/P ] [/L ] where the default values are: code page - none DBCS range - none A valid DBCS range is: n10,n11,n20,n21,...,nn0,nn1 A single number is taken as a DBCS country code. The valid OS/2 language/sublanguage ID values are: ┌──────┬────────┬─────┬───────────────────────┬──────────────────┐ │Code │Family │Sub │Language │Principal country │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ ARA │ 1 │ 2 │Arabic │Arab Countries │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ BGR │ 2 │ 1 │Bulgarian │Bulgaria │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ CAT │ 3 │ 1 │Catalan │Spain │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ CHT │ 4 │ 1 │Traditional Chinese │R.O.C. │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ CHS │ 4 │ 2 │Simplified Chinese │P.R.C. │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ CSY │ 5 │ 1 │Czech │Czechoslovakia │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ DAN │ 6 │ 1 │Danish │Denmark │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ DEU │ 7 │ 1 │German │Germany │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ DES │ 7 │ 2 │Swiss German │Switzerland │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ EEL │ 8 │ 1 │Greek │Greece │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ ENU │ 9 │ 1 │US English │United States │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ ENG │ 9 │ 2 │UK English │United Kingdom │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ ESP │ 10 │ 1 │Castilian Spanish │Spain │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ ESM │ 10 │ 2 │Mexican Spanish │Mexico │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ FIN │ 11 │ 1 │Finnish │Finland │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ FRA │ 12 │ 1 │French │France │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ FRB │ 12 │ 2 │Belgian French │Belgium │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ FRC │ 12 │ 3 │Canadian French │Canada │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ FRS │ 12 │ 4 │Swiss French │Switzerland │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ HEB │ 13 │ 1 │Hebrew │Israel │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ HUN │ 14 │ 1 │Hungarian │Hungary │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ ISL │ 15 │ 1 │Icelandic │Iceland │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ ITA │ 16 │ 1 │Italian │Italy │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ ITS │ 16 │ 2 │Swiss Italian │Switzerland │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ JPN │ 17 │ 1 │Japanese │Japan │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ KOR │ 18 │ 1 │Korean │Korea │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ NLD │ 19 │ 1 │Dutch │Netherlands │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ NLB │ 19 │ 2 │Belgian Dutch │Belgium │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ NOR │ 20 │ 1 │Norwegian - Bokmal │Norway │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ NON │ 20 │ 2 │Norwegian - Nynorsk │Norway │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ PLK │ 21 │ 1 │Polish │Poland │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ PTB │ 22 │ 1 │Brazilian Portuguese │Brazil │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ PTG │ 22 │ 2 │Portuguese │Portugal │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ RMS │ 23 │ 1 │Rhaeto-Romanic │Switzerland │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ ROM │ 24 │ 1 │Romanian │Romania │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ RUS │ 25 │ 1 │Russian │U.S.S.R. │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ SHL │ 26 │ 1 │Croato-Serbian (Lat │Yugoslavia │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ SHC │ 26 │ 2 │Serbo-Croatian (Cyr │Yugoslavia │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ SKY │ 27 │ 1 │Slovakian │Czechoslovakia │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ SQI │ 28 │ 1 │Albanian │Albania │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ SVE │ 29 │ 1 │Swedish │Sweden │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ THA │ 30 │ 1 │Thai │Thailand │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ TRK │ 31 │ 1 │Turkish │Turkey │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ URD │ 32 │ 1 │Urdu │Pakistan │ ├──────┼────────┼─────┼───────────────────────┼──────────────────┤ │ BAH │ 33 │ 1 │Bahasa │Indonesia │ └──────┴────────┴─────┴───────────────────────┴──────────────────┘ ═══ 11.1.2. Input Message File ═══ The input message file is a standard ASCII file that contains three types of lines: o Comment lines o Component identifier line o Component message lines Comment Lines Comment lines are allowed anywhere in the input message file, except between the component identifier and the first message. Comment lines must begin with a semicolon (;) in the first column. In the Input Message File Example, the comment lines are ; This is a sample of an input ; message file for component DOS ; starting with three comment lines. Component Identifier Line The component-identifier line contains a three-character name identifier that precedes all MKMSGF message numbers. In the example, the component identifier is DOS. Component-Message Lines Each component-message line consists of a message header and an ASCII text message. The message header is comprised of the following parts: o A three-character component identifier o A four-digit message number o A single character specifying message type (E, H, I, P, W, ?) o A colon (:) o Followed by a blank space. The following message types are used: Type Meaning E Error H Help I Information P Prompt W Warning ? no message assigned to this number The message header must begin in the first column of the line. Only one header can precede the text of a message, although a message can span multiple lines. Message numbers can start at any number, but messages must be numbered sequentially. If you do not use a message number, you must insert an empty entry in its place in the text file. An empty entry consists of the message number, with ? as the message type, and no text. The character % has a special meaning when used within the text of a message: %0 is placed at the end of a prompt (type P) to prevent DosGetMessage from executing a carriage return and line feed. This allows the user to be prompted for input on the same line as the message text. %1 - %9 are used to identify variable string insertion within the text of a message. These variables correspond to the Itable and IvCount parameters in the DosGetMessage call. Component-Message Example For example, DOS0100E: is DOS error message 100. For additional examples, see the Input Message File Example. ═══ 11.1.3. Output File ═══ The output file contains the indexed message file that DosGetMessage will use. The output-file name can be any valid OS/2 file name, optionally preceded by a drive letter and a path. The output file cannot have the same name as the input file. To differentiate between the two files, the following convention is recommended, using the same file name. o The infile file should have a .TXT extension. o The outfile file should have a .MSG extension. Help-message file names begin with the component identifier, followed by H.MSG. For example, the help file associated with the component identifier DOS would be DOSH.MSG. ═══ 11.2. Options ═══ Text-based messages in different code pages can be created using MKMSGF to display errors, help information, prompt, or provide general information to the application user. MKMSGF uses the following parameter formats to build message files: MKMSGF infile outfile /Pcodepage MKMSGF infile outfile /Ddbcsrange or country id MKMSGF infile outfile /LlangID,VerId MKMSGF infile outfile /V MKMSGF infile outfile /? MKMSGF @controlfile o Infile is the ASCII-text source file. Example: MSG MSG0001I: (mm%4dd%4yy) %2%4%1%4%3 MSG0002I: (dd%4mm%4yy) %1%4%2%4%3 MSG0003I: Current date is: %0 %0 is a special argument that displays a prompt for user input. %1 - %9 are the arguments the user can use to insert text in a message. o Outfile is the binary output message file. o @controlfile is the message definition file. Options /P Code-page ID for the input message file. See /P Option /D DbcsRange or country ID for the input message file. See /D Option /L Language family ID (one word) and language version ID (one word). See /L Option /V Verbose display of message file control variables as the message file is being created. See /Verbose Option Output Example /? Help display of command syntax for MKMSGF. Note: Any combination of /P, /D, /L, and /V switches can be used for either the command line or @controlfile execution method. The / switch prefix and the - prefix can be used interchangeably when defining switches to MKMSGF. ═══ 11.2.1. /Verbose Option Output Example ═══ Following is a sample of MKMSGF output, using the Verbose option (/V). This output was produced using the following command: mkmsgf myapp.txt myapp.msg /v strIn = myapp.txt strOut = myapp.msg StrIncDir = (null) CodePages = 437 Language family id = 0 and sub id = 0 Language family id and sub id = unspecified flags = none CP_type = SBCS "myapp.txt": length = 382 bytes. 29 messages scanned. Writing output file... Size of table entry: word ═══ 11.2.2. /P Option ═══ The Code-page option (/P) specifies the code-page ID for that input message file. Up to 16 /P combinations can be saved with the message file. /P cannot be used to identify DBCS data. ═══ 11.2.3. /D Option ═══ The DBCS option (/D) specifies the DBCS Range or country ID for that input message file. Valid DBCS country ID will cause the initialization of valid DBCS ranges to be set up for this file. ═══ 11.2.4. /L Option ═══ The Language option (/L) specifies the language family ID (one word) and language version ID (one word). Valid combination of language family and language version will be set for this file. A valid language family with invalid or undefined language version id will cause a default value of 1 to be set for language version. ═══ 11.3. Control Files ═══ The control file (@controlfile) is used to create multiple-code-page message files. The at sign (@) is not part of the file name, but rather, a delimiter required before a control-file name. The control file has the following format: Example: root.in root.out /Pcodepage /Ddbcsrang/ctryid /LlangID,VerId sub.001 sub1.out /Pcodepage /Ddbcsrang/ctryid /LlangID,VerId . . sub.00n subn.out /Pcodepage /Ddbcsrang/ctryid /LlangID,VerId The help option (/?) is invalid due to the purpose of the definition file. Note: Any combination of /P /D /L and /V switches can be used for either the command line or msg_definition_file execution method. ═══ 11.3.1. Input Message File Example ═══ Following is an example of an input message file: ; This is a sample of an input ; message file for component MAB ; starting with three comment lines. MAB MAB0100E: File not found MAB0101?: MAB0102H: Usage: del [drive:][path] filename MAB0103?: MAB0104I: %1 files copied MAB0105W: Warning! All data will be destroyed! MAB0106?: MAB0107?: MAB0108P: Do you wish to apply these patches (Y or N)? %0 MAB0109E: Divide overflow ═══ 12. MAP File to SYM File Creator (MAPSYM) ═══ The MAPSYM program creates .SYM files from .MAP files. .SYM files are used by the kernel debugger for symbolic debugging. Note: You must run MAPSYM from the directory in which the file to be converted is located. To create a .SYM file, follow these steps: 1. Make sure you are in the correct directory. 2. At the prompt type the following: mapsym filename Note that the .MAP extension is not required. ═══ 12.1. Help ═══ To display MAPSYM help, type MAPSYM at the prompt, with no arguments. The appropriate copyright statement appears, along with the following: usage: mapsym [-aln] mapfile ═══ 12.2. Options ═══ The following options may be used with MAPSYM: /A Omits Alphabetical sorting of symbols. /N Includes source code line Numbers in *.SYM file. /L Produces verbose Listing. ═══ 13. View and Set Program Type For Executable File (MARKEXE) ═══ The MARKEXE program enables you to view and set the program type for an executable file. The program type identifies the OS/2 sessions in which a program can run. Use MARKEXE with the OS/2 Linear Executable Linker (LINK386) or the OS/2 Segmented Executable Linker (LINK) to change or set the program type of programs you have created. You can set DLL initialization and termination and also enable long file name support. When using LINK386, you can set DLL initialization and termination; long file name support is already set. When using LINK, you can set DLL initialization and long file name support. ═══ 13.1. Command-Line Syntax ═══ MARKEXE uses the following syntax: MARKEXE [/?] [FORCE] [NO] [options] filename... Filename is a file name or a list of file names. Global file-name characters (*.EXE) also can be used. For descriptions of the above terms, see Syntax Definitions. If no option is given, DISPLAY is assumed. Typing MARKEXE /? at the command line displays the appropriate copyright statement along with a list of options. DISPLAY - display status of flags DLLINIT - per-process initialization DLLTERM - per-process termination WINDOWAPI - window api (PM application) WINDOWCOMPAT - window compatible application NOTWINDOWCOMPAT - not window compatible application UNSPECIFIED - unspecified application type LFNS - long file name support ═══ 13.1.1. Syntax Definitions ═══ MARKEXE has the following keywords, options, and program types. You can also specify any number of files to be viewed or marked. KEYWORDS FORCE Marks the executable file with OS/2 as the target operating system even though the file was marked for another operating system. Using FORCE might produce internally inconsistent executable files. NO Sets the command to the opposite condition. This keyword does not apply to the DISPLAY, UNSPECIFIED, or WINDOWAPI options. OPTIONS DISPLAY Displays the application type in a message; does not make any changes. DLLINIT Sets per process initialization for the dynamic link library. (Use with LINK386 only.) DLLTERM Sets per process termination for the dynamic link library. (Use with LINK only.) LFNS Enables support of long file names. (Use with LINK only.) PROGRAM TYPES MARKEXE does not modify the file if the executable file's program type is the same as the requested type. It displays a message instead. WINDOWAPI The application is a Presentation Manager application and can run in the Presentation Manager session only. WINDOWCOMPAT The application can run in a Presentation Manager window or in an full-screen session. NOTWINDOWCOMPAT The application must run in an OS/2 full-screen session. UNSPECIFIED The application type is not known. By default, the OS/2 operating system will force the program to run in a full-screen session. Note: Specifying an incorrect program type might cause undesirable results when you try to run that program. For example, do not change a WINDOWCOMPAT program to WINDOWAPI. ═══ 13.1.2. Viewing Program Type ═══ To display the program type of an executable file without changing the file, specify only a file name, omitting an option. MARKEXE filename.exe Example To view the program type of MYPROG.EXE, type the following: MARKEXE myprog.exe MARKEXE displays the type in a message that looks like this: myprog.exe: OS/2 1.x, WINDOWCOMPAT, LFNS ═══ 13.1.3. Setting Program Type ═══ To set the program type of an executable file, specify one of the program types. More than one executable file can be set to the same program type on a single command line. MARKEXE type filename.exe another.exe Examples To set WINDOWCOMPAT as the program type of MYPROG.EXE, type: MARKEXE WINDOWCOMPAT myprog.exe To set WINDOWAPI as the program type of several executable files, type: MARKEXE WINDOWAPI marion.exe alex.exe ═══ 14. Message Segment Binder (MSGBIND) ═══ The MSGBIND program binds a message segment to an executable program. It does this by reading an input file that specifies the executable files to modify. For each executable file, MSGBIND specifies which message files to scan, and for each message file, it specifies which messages to include in the executable file. Although the resulting executable file will be larger, access to messages will be faster. In the OS/2 operating system, message segment/objects are packed with other application code. If the size of the code segment/object and the bound messages exceeds 64KB, the following statement in the program definition file (.DEF) isolates the application code from the message statement/object: 16 Bit Applications SEGMENT 32 Bit Applications SEGMENT '_MSGSEG32' CLASS 'CODE' ═══ 14.1. Syntax ═══ The MSGBIND command line has the following form: MSGBIND infile The infile field specifies the input file that identifies the executable files, output message files, and message numbers that will be bound. The input-file name can be any valid OS/2 file name and can include an optional file name extension. ═══ 14.1.1. Input File ═══ The input file contains the following three types of lines: o > Executable file o < Message file o Message numbers. Executable file The File in which messages are to be bound is preceded by a greater-than symbol (>). The name of the file can be any valid OS/2 file name. Two or more different executable files can be modified by the specifications found in one input file. MSGBIND continues to use this file until it encounters another greater-than symbol. Message file The message file to be read from is preceded by a less-than sign (<). You create this file by using the MKMSGF program. The name can be any valid OS/2 file name. All message numbers that follow it are located in the specified message file and are copied to the current output executable file. MSGBIND reads the message-number list until it encounters one of the following: the end of the input file, a new output specification, or a new input message file. Message Numbers The messages in the message file are listed below the message-file name. Only those message numbers that you specify will be added. You can also specify an asterisk (*) to indicate that all messages within the message file will be added. Message numbers must consist of a three-letter component identifier followed by a four-digit message number. See Input Message File for a more detailed description of message numbers. ═══ 14.1.2. Multiple Code-Page Message Files ═══ Multiple code-page message files can also be bound to an executable file, which enables a user to bind to an application messages for different countries. The following example shows how three messages in two different languages can be bound to an executable file: MSGBIND infile where infile consists of the following: >PROG1.EXE c:\cmd.exe c:\format.exe ). This field is required when you modify an existing object that was not dropped on Object Utility/2. You are warned if you try to create an instance that is not a template, without an Object ID. You may create the new instance without an object ID. The Object ID must be unique, if specified, when creating an instance. Templates cannot have an object ID. Instances with an object ID cannot be made into a template. ═══ 15.4. Title Field ═══ The Title field is required when creating a new object. You can alter the title of an existing object by providing a different title in this field. ═══ 15.5. Location Field ═══ You can select an existing location from the location list or enter a location manually. The location must be an object ID that represents a folder (enclosed in angle brackets) or a fully qualified path name. ═══ 15.6. Options ═══ Create Instance Creates an instance of the class. Template Creates a template of the class in the Templates folder. No Copy Removes Copy from the pop-up menu. No delete Removes Delete from the pop-up menu. No Rename Removes Rename from the pop-up menu. No Print Removes Print from the pop-up menu. No Link Removes Link from the pop-up menu. No Move Removes Move from the pop-up menu. No drag Prevents dragging of the object. ═══ 16. Program Maintenance Utility (NMAKE) ═══ The Program Maintenance Utility (NMAKE) automates the process of updating project files. NMAKE compares the modification dates for one set of files (the target files) with those of another set of files (the dependent files). If any dependent files have changed more recently than the target files, NMAKE executes a series of commands to bring the targets up-to-date. ═══ 16.1. Why Use NMAKE? ═══ The most common use of NMAKE is to automate the process of updating a project after you make a change to a source file. Large projects tend to have many source files. Often, only a few of your source files need to be compiled when you make a change. You set up a special text file called a "description" file (or "makefile") that tells NMAKE: o Which files depend on others o Which commands, such as compile and link commands, need to be carried out to bring your program up-to-date This use of NMAKE is only one example of its power. By building suitable description files, you can use NMAKE to o Make backups o Configure data files o Run programs when data files are modified ═══ 16.2. Running NMAKE ═══ Run NMAKE by typing NMAKE on the operating-system command line. Supply input to NMAKE by either of two methods: o Enter the input directly on the command line. o Put your input into a command file (a text file, also called a response file) and enter the file name on the command line. Press CTRL+C at any time during an NMAKE run to return to the operating system. Note: Under the OS/2 operating system, do not use the ampersand character (&) to combine the NMAKE command with the CD, CHDIR, or SET command. ═══ 16.2.1. Using the Command Line ═══ When using NMAKE at the command line, keep the following in mind: o All fields are optional. o NMAKE always looks first in the current directory for a description file called MAKEFILE. If MAKEFILE does not exist, NMAKE uses the given with the /F (specify description file) option. ═══ 16.2.1.1. Command-Line Syntax ═══ NMAKE [options] [macrodefinitions] [targets] [/F filname] Specifies options that modify NMAKE's actions. Lists macro definitions for NMAKE to use. Macro definitions that contain spaces must be enclosed by double quotation marks. Specifies the names of one or more target files to build. If you do not list any targets, NMAKE builds the first target in the description file. /F Gives the name of the description file where you specify file dependencies and which commands to execute when a file is out-of-date. The following example: NMAKE /S "program = flash" SORT.EXE SEARCH.EXE o Invokes NMAKE with the /S option o Defines a macro, assigning the string "flash" to the macro "program" o Specifies two targets: SORT.EXE and SEARCH.EXE By default, NMAKE uses the file named MAKEFILE as the description file. ═══ 16.2.1.2. Command-Line Help ═══ To display NMAKE help, type NMAKE /? at the prompt. The appropriate copyright statement appears, along with the following: Usage: NMAKE @commandfile NMAKE /help NMAKE [/nologo] [/acdeinpqrst?] [/f makefile] [/x stderrfile] [macrodefs][targets] Where the options stand for /a force All targets to be built /c Cryptic mode; suppress sign-on banner & warning messages /d Display modification dates /e Environment variables override macros in the makefile /i Ignore exit codes of commands invoked /n No execute mode; display commands only /p Print macro definitions & target descriptions /q Query if target is up to date; for use in batch files /r inference Rules from 'tools.ini' to be ignored /s Silent execution of commands /t Touch targets with current date & time /? Help message /help Help message /nologo do not display sign-on banner ═══ 16.2.2. Using NMAKE Command Files ═══ A command file is a response file used to extend command-line input to NMAKE. You can split input to NMAKE between the command line and a command file. Use the name of a command file (preceded by @) where you normally type the input information on the command line. Why Use a Command File? Use a command file for o Complex and long commands you type frequently o Strings of command-line arguments, such as macro definitions, that exceed the limit for command-line length Note: A command file is not the same as a description file. For information about description files, see Description Files Command File Syntax To provide input to NMAKE with a command file, type NMAKE @commandfile In the field, enter the name of a file containing the same information as is normally entered on the command line. NMAKE treats line breaks that occur between arguments as spaces. Macro definitions can span multiple lines if you end each line except the last with a backslash (\). Macro definitions that contain spaces must be enclosed by quotation marks, just as if they were entered directly on the command line. Example The following is a command file called UPDATE: /S "program \ = flash" SORT.EXE SEARCH.EXE You can use this command file by typing the following command: NMAKE @UPDATE This runs NMAKE using: o The /S option o The macro definition "program = flash" o The targets specified as SORT.EXE and SEARCH.EXE o The description file MAKEFILE by default Note that the backslash allows the macro definition to span two lines. ═══ 16.3. Options ═══ The following describes the options you can use with NMAKE. Keep the following in mind when using options: o Option characters are not case sensitive; /I and /i are equivalent. o You can use either a slash or dash before the option characters; -a and /a are equivalent. ═══ 16.3.1. Produce Error File (/X) ═══ Syntax: /X stderrfile This option produces a standard error file. ═══ 16.3.2. Build All Targets (/A) ═══ Syntax: /A This option builds all specified targets even if they are not out-of-date with respect to their dependent files. See Description Files. ═══ 16.3.3. Suppress Messages (/C) ═══ Syntax: /C This option suppresses display of the NMAKE sign-on banner, nonfatal error messages, and warning messages. To suppress the sign-on banner without suppressing other messages, use the /NOLOGO option. ═══ 16.3.4. Display Modification Dates (/D) ═══ Syntax: /D This option displays the modification date of each file when the dates of target and dependent files are checked. See Description Files. ═══ 16.3.5. Override Environment Variables (/E) ═══ Syntax: /E This option disables inherited macro redefinition. NMAKE inherits all current environment variables as macros, which can be redefined in a description file. The /E option disables any redefinition - the inherited macro always has the value of the environment variable. ═══ 16.3.6. Specify Description File (/F) ═══ Syntax: /F filename This option specifies as the name of the description file to use. If a dash (-) is entered instead of a file name, NMAKE reads a description file from the standard input device, typically the keyboard. If a filename is not specified, it defaults to MAKEFILE. ═══ 16.3.7. Display Help (/HELP or /?) ═══ Syntax: /HELP OR /? This option displays a brief summary of NMAKE syntax. ═══ 16.3.8. Ignore Exit Codes (/I) ═══ Syntax: /I This option ignores exit codes (also called error level or return codes) returned by programs such as compilers or linkers called by NMAKE. If this option is not specified, NMAKE ends when any program returns a nonzero exit code. ═══ 16.3.9. Display Commands (/N) ═══ Syntax: /N This option causes NMAKE commands to be displayed but not executed. Use the /N option to: o Check which targets are out-of-date with respect to their dependents o Debug description files ═══ 16.3.10. Suppress Sign-On Banner (/NOLOGO) ═══ Syntax: /NOLOGO This option suppresses the sign-on banner display when NMAKE is started. If you want to suppress nonfatal error messages and warnings as well, use the suppress messages (/C) option. ═══ 16.3.11. Print Macro and Target Definitions (/P) ═══ Syntax: /P This option writes out all macro definitions and target definitions. Output is sent to the standard output device (typically the display). ═══ 16.3.12. Return Exit Code (/Q) ═══ Syntax: /Q This option causes NMAKE to return either of the following: o A 0 exit code if all targets built during-an-NMAKE run are up-to-date o A nonzero exit code if they are not up-to-date Use this option to run NMAKE from within a batch file. ═══ 16.3.13. Ignore TOOLS.INI File (/R) ═══ Syntax: /R This option ignores the following: o All inference rules and macros contained in the TOOLS.INI file o All predefined inference rules and macros ═══ 16.3.14. Suppress Command Display (/S) ═══ Syntax: /S This option suppresses the display of commands as they are executed by NMAKE. It does not suppress the display of messages generated by the commands themselves. The /N command (Display Commands) takes precedence over the /S option. If you use /N and /S together, commands are displayed but not executed. ═══ 16.3.15. Change Target Modification Dates (/T) ═══ Syntax: /T This option changes or "touches" the modification dates for out-of-date target files to the current date. No commands are executed, and the target file is left unchanged. ═══ 16.4. Description Files ═══ NMAKE uses a description file to determine what to do. In its simplest form, a description file tells NMAKE which files depend on others and which commands need to be executed if a file changes. A description file looks like this: targets...: dependents...│ command │ ──description block : │ targets... : dependents... command ═══ 16.4.1. Description Blocks ═══ A dependent relationship between files is defined in a description block. A "description block" indicates the relationship among various parts of the program. It contains commands to bring all components up to date. The description file can contain up to 1048 description blocks. Description File Description Block ┌──────────────┐ ┌───────── ┌───────────────────────────┐ │ Description │ │ │ │ │ Block 1 │ │ │targets... : dependents... │ ├──────────────┤─────┘ │ command │ │ Descr Blk 2 │ │ command │ ├──────────────┤─────┐ │ command │ │ : │ │ │ : │ ├──────────────┤ │ │ │ │ Descr Blk n │ │ │ │ │ │ │ │ │ └──────────────┘ └───────── └───────────────────────────┘ ═══ 16.4.2. Special Features ═══ The following are special features of description blocks: o Description files can contain macro definitions and use macros in description blocks. Macros allow easy substitution of one text string for another. o Description files can contain inference rules. Inference rules allow NMAKE to infer which commands to execute based on the file-name extensions used for targets and dependents. o You can specify directories for NMAKE to search for dependent files by using the following syntax: targets : {directory1;directory2...}dependents NMAKE searches the current directory first, then , , and so on. o A command can be placed on the same line as the target and dependent files by using a semicolon (;) as depicted below: targets... : dependents... ; command o A long command can span several lines if each line ends with a backslash ( \ ): command \ continuation of command o The execution of a command can be modified if you precede the command with special characters. o If you do not specify a command in a description block, NMAKE looks for an inference rule to build the target. o DOS and OS/2 wild card characters (* and ?) can be used in description blocks. For example, the following description block compiles all source files with the .C extension: ASTRO.EXE : *.C ICC $** o NMAKE will expand the *.C specification into the complete list of C files in the current directory. $** is a complete list of dependents specified for the current target. o NMAKE uses several punctuation characters in its syntax. To use one of these characters as a literal character, place an escape character ( ^ ) in front of it. For a list of punctuation characters, see Escape Characters. o Normally a target file can appear in only one description block. A special syntax allows you to use a target in several description blocks. o A special syntax allows you to determine the drive, path, base name, and extension of the first dependent file in a description block. ═══ 16.4.3. Targets in Several Description Blocks ═══ Using a file as a target in more than one description block causes NMAKE to end. You can overcome this limitation by using two colons (::) as the target/dependent separator instead of one colon. The following description block is permissible: X :: A command X :: B command The following causes NMAKE to end: X : A command X : B command It is permissible to use single colons if the target/dependent lines are grouped above the same commands. The following is permissible: X : A X : B command Double Colon (::) Target/Dependent Separator Example TARGET.LIB :: A.ASM B.ASM C.ASM ML A.ASM B.ASM C.ASM LIB TARGET -+A.OBJ -+B.OBJ -+C.OBJ; TARGET.LIB :: D.C E.C ICC /C D.C E.C LIB TARGET -+D.OBJ -+E.OBJ; These two description blocks both update the library named TARGET.LIB. If any of the assembly-language files have changed more recently than the library file, NMAKE executes the commands in the first block to assemble the source files and update the library. Similarly, if any of the C-language files have changed, NMAKE executes the second group of commands to compile the C files and update the library. ═══ 16.5. Macros ═══ Macros provide a convenient way to replace one string with another in the description file. The text is automatically replaced each time NMAKE is run. This feature makes it easy to change text throughout the description file without having to edit every line that uses the text. Two common uses of macros are: Two Common Uses of Macros o To create a standard description file for several projects. The macro represents the file names in commands. These file names are defined when you run NMAKE. When you switch to a different project, changing the macro changes the file names NMAKE uses throughout the description file. o To control the options that NMAKE passes to the compiler, assembler, or linker. When using a macro to specify the options, you can quickly change the options throughout the description file in one easy step. A macro can be defined : In a Description File On the Command Line In TOOLS.INI Through inheritance from Environment Variables ═══ 16.5.1. Macros Example ═══ program = FLASH c = LINK options = $(program).EXE : $(program).OBJ $c $(options) $(program).OBJ; The example above defines three macros. The description block executes the following commands: FLASH.EXE : FLASH.OBJ LINK FLASH.OBJ; ═══ 16.5.2. Special Features ═══ Macros have the following special features: o When using a macro, you can substitute text in the macro itself. o Several macros have been predefined for special purposes. o If a macro is defined more than once, precedence rules govern which definition is used. o You can also put macros into your TOOLS.INI file. ═══ 16.5.3. Macros in a Description File ═══ Before using a macro, you need to define it, either on the NMAKE command line or in your description file. Description file macro definitions look like this: macroname = macrostring Macro names can be any combination of alphanumeric characters and the underscore character ( _ ), and they are case-sensitive. A macro string can be any string of characters. The first character of the macro name must be the first character on the line. NMAKE ignores any spaces before or after the equal sign ( = ). The macro string can be a null string and can contain embedded spaces. Do not enclose the macro string in quotation marks; quotation marks are used only when you define macros on the command line. ═══ 16.5.4. Macros on the Command Line ═══ Before using a macro, you need to define it, either on the NMAKE command line or in your description file. Command-line macro definitions look like this: macroname=macrostring No spaces can surround the equal sign. If you embed spaces, NMAKE might misinterpret your macro. If your macro string contains embedded spaces, enclose it in double quotation marks ( " ) like this: macroname="macro string" or simply enclose the entire macro definition in double quotation marks ( " ) like this: "macroname = macro string" Macro names can be any combination of alphanumeric characters and the underscore character ( _ ), and they are case-sensitive. A macro string can be any string of characters or a null string. ═══ 16.5.5. Inherited Macros ═══ NMAKE inherits all current environment variables as macros. For example, if you have a PATH environment variable defined as PATH = C:\TOOLS\BIN, the string C:\TOOLS\BIN is substituted when you use PATH in the description file. You can redefine inherited macros by including a line such as the example above in a description file. While NMAKE is executing, the macro takes on the redefined definition. When NMAKE terminates, however, the environment variable resumes its original value. The Override Environment Variables (/E) option disables inherited macro redefinition. If you use this option, NMAKE ignores any attempt to redefine an inherited macro. ═══ 16.5.6. Defined Macros ═══ After you have defined a macro, you can use it anywhere in your description file with the following syntax: $(macroname) The parentheses are not required if the macro name is only one character long. To use a dollar sign ( $ ) without using a macro, enter two dollar signs ( $$ ), or use the caret ( ^ ) before the dollar sign as an escape character. When NMAKE runs, it replaces all occurrences of $(macroname) with the defined macro string. If the macro is undefined, nothing is substituted. After a macro is defined, you can cancel it only with the !UNDEF directive. ═══ 16.5.7. Macro Substitutions ═══ Just as you use macros to substitute text within a description file, you use the following syntax to substitute text within a macro: $(macroname: string1 = string2) Every occurrence of is replaced by in . Spaces between the colon and are considered part of . If is a null string, all occurrences of are deleted from the macro. The colon ( : ) must immediately follow . Note: The replacement of with in the macro is not a permanent change. If you use the macro again without a substitution, you get the original unchanged macro. Example SOURCES = ONE.C TWO.C THREE.C PROGRAM.EXE : $(SOURCES:.C=.OBJ) LINK $**; The example above defines a macro called SOURCES, which contains the names of three C source files. With this macro, the target/dependent line substitutes the .OBJ extension for the .C extension. Thus, NMAKE executes the following command: LINK ONE.OBJ TWO.OBJ THREE.OBJ; Note: $** is a special macro that translates to all dependent files for a given target. ═══ 16.6. Special Macros ═══ NMAKE predefines several macros. The first six macros below return one or more file specifications for the files in the target/dependent line of a description block. Except where noted, the file specification includes the path of the file, the base file name, and the file-name extension. Macro Value $@ The specification of the target file. $* The base name (without extension) of the target file. Path information is also returned if the path was specified as part of the target file name. This macro cannot be used in a dependent list. $** The specifications of the dependent files. $? The specifications for only those dependent files that are out-of-date with respect to the targets. $< The specification of a single dependent file that is out-of-date with respect to the targets. This macro is used only in inference rules. $$@ The file specification of the target that NMAKE is currently evaluating. This is a dynamic dependency parameter, used only in dependent lists. $(CC) The string ICC, which is the command to run the C Set ++ Compiler. You can redefine this macro to use a different command. $(AS) The string MASM, which is the command to run the Macro Assembler (MASM). You can redefine this macro to use a different command. $(MAKE) The command name used to run NMAKE. This macro is used to invoke NMAKE recursively. If you redefine this macro, NMAKE issues a warning message. Note: NMAKE executes the command line in which $(MAKE) appears, even if the display commands (/N) option is on. $(MAKEFLAGS) The NMAKE options currently in effect. You cannot redefine this macro. Note: The special macros $** and $$@ are the only exceptions to the rule that macro names longer than one character must be enclosed in parentheses. You can append characters to any of the first six macros in this list to modify the meaning of the macro. However, you cannot use macro substitutions in these macros. ═══ 16.6.1. Special Macros Examples ═══ TRIG.LIB : SIN.OBJ COS.OBJ ARCTAN.OBJ !LIB TRIG.LIB -+$?; In the example above, the macro $? represents the names of all dependent files that are out-of-date with respect to the target file. The exclamation point ( ! ) preceding the LIB command causes NMAKE to execute the LIB command once for each dependent file in the list. As a result of this description, the LIB command is executed up to three times, each time replacing a module with a newer version. DIR=C:\INCLUDE $(DIR)\GLOBALS.H : GLOBALS.H COPY GLOBALS.H $@ $(DIR)\TYPES.H : TYPES.H COPY TYPES.H $@ $(DIR)\MACROS.H : MACROS.H COPY MACROS.H $@ The example above shows how to update a group of include files. Each of the files GLOBALS.H, TYPES.H, and MACROS.H in the directory C:\INCLUDE depends on its counterpart in the current directory. If one of the include files is out-of-date, NMAKE replaces it with the file of the same name from the current directory. The following description file, which uses the special macro $$@, is equivalent: DIR=C:\INCLUDE $(DIR)\GLOBALS.H $(DIR)\TYPES.H $(DIR)\MACROS.H : $$(@F) !COPY $? $@ The special macro $$(@F) signifies the file name (without the path) of the current target. When NMAKE evaluates the description block, it evaluates the three targets, one at a time, with respect to their dependents. Thus, NMAKE first checks whether C:\INCLUDE\GLOBALS.H is out-of-date compared with GLOBALS.H in the current directory. If so, it executes the command to copy the dependent file GLOBALS.H to the target. NMAKE repeats the procedure for the other two targets. Note that on the command line, the macro $? refers to the dependent for this target. The macro $@ specifies the full file specification of the target file. ═══ 16.6.2. File-Specification Parts ═══ A full file specification gives the base name of the file, the file-name extension, and the path. The path provides the disk-drive identifier and the sequence of directories needed to locate the file on the disk. For example, the file specification C:\SOURCE\PROG\SORT.OBJ has the following parts: Path Name C:\SOURCE\PROG Base File Name SORT File-Name Extension .OBJ ═══ 16.6.3. Characters That Modify Special Macros ═══ The following six macros all resolve to a file specification (or possibly several file specifications for $** and $?): $* $@ $** $< $? $$@ You can append characters to any of these macros to modify the file name returned by the macro. Depending on which character you use, parts of the full file specification are returned: Appended Character File Part Returned D F B R File Path Yes No No Yes Base File Name No Yes Yes Yes File Name Extension No Yes No No ═══ 16.6.4. Modified Special Macros Example ═══ If the macro $@ has the value C:\SOURCE\PROG\SORT.OBJ then the following values are returned for the modified macro: Macro Value $(@D) C:\SOURCE\PROG $(@F) SORT.OBJ $(@B) SORT $(@R) C:\SOURCE\PROG\SORT Note: Modified macros are always longer than a single character - they must be enclosed by parentheses when used. ═══ 16.6.5. Macro Precedence Rules ═══ When the same macro is defined in more than one place, the definition with the highest priority is used: Priority Definition 1 (Highest) Command line 2 Description file 3 Environment variables 4 TOOLS.INI file 5 (Lowest) Predefined macros (such as CC and AS) If you invoke NMAKE with the Overriding Macro Definitions (/E) option, macros defined by environment variables take precedence over those defined in a description file. ═══ 16.7. Inference Rules ═══ Inference rules are templates from which NMAKE infers what to do with a description block when no commands are given. Only those extensions defined in a .SUFFIXES list can have inference rules. The extensions .C, .OBJ, .ASM, and .EXE are automatically included in .SUFFIXES. When NMAKE encounters a description block with no commands, it looks for an inference rule that specifies how to create the target from the dependent files, given the two file extensions. Similarly, if a dependent file does not exist, NMAKE looks for an inference rule that specifies how to create the dependent from another file with the same base name. NMAKE applies an inference rule only if the base name of the file it is trying to create matches the base name of a file that already exists. In effect, inference rules are useful only when there is a one-to-one correspondence between the files with the "from" extension and the files with the "to" extension. You cannot, for example, define an inference rule that inserts a number of modules into a library. The use of inference rules eliminates the need to put the same commands in several description blocks. For example, you can use inference rules to specify a single ICC command that changes any C source file (with a .C extension) to an object file (with a .OBJ extension). You define an inference rule by including text of the following form in your description file or in your TOOLS.INI file - see "Special Features". .fromext.toext: commands : The elements of the inference rule are: The file-name extension for dependent files to build a target The file-name extension for target files to be built The commands to build the target from the dependent. For example, an inference rule to convert C source files (with the .C extension) to C object files (with the .OBJ extension) is .C.OBJ: ICC $< Note: The special macro $< represents the name of a dependent out-of-date relative to the target. ═══ 16.7.1. Special Features ═══ o You can specify a path where NMAKE should look for target and dependent files used in inference rules. o Inference rules are predefined for compiling and linking C programs, and for assembling programs. o NMAKE looks for inference rules in the TOOLS.INI file if it cannot find a rule in a description file. o Only those extensions defined in a .SUFFIXES list can have inference rules. The extensions .C, .OBJ, .ASM, and .EXE are automatically included in .SUFFIXES. ═══ 16.8. Inference Rules Example ═══ .OBJ.EXE: LINK $<; EXAMPLE1.EXE: EXAMPLE1.OBJ EXAMPLE2.EXE: EXAMPLE2.OBJ LINK /CO EXAMPLE2,,,LIBV3.LIB The first line above defines an inference rule that causes the LINK command to create an executable file whenever a change is made in the corresponding object file. The file name in the inference rule is specified with the special macro $< so that the rule applies to any .OBJ file with an out-of-date executable file. When NMAKE does not find any commands in the first description block, it checks for a rule that might apply and finds the rule defined on the first two lines of the description file. NMAKE applies the rule, replacing $< with EXAMPLE1.OBJ when it executes the command, so that the LINK command becomes LINK EXAMPLE1.OBJ; NMAKE does not search for an inference rule when examining the second description block, because a command is explicitly given. ═══ 16.8.1. Inference-Rule Path Specifications ═══ When defining an inference rule, you can indicate to NMAKE where to look for target and dependent files. Use the following syntax: {frompath}.fromext{topath}.toext commands : NMAKE looks in the directory specified by for files with the extension. It executes the commands to build files with the extension in the directory specified by . ═══ 16.8.2. Predefined Inference Rules ═══ NMAKE predefines three inference rules: ┌────────────────────┬────────────────────┬────────────────────┐ │Inference Rule │Default │Command Action │ ├────────────────────┼────────────────────┼────────────────────┤ │.C.OBJ │$(CC) $(CFLAGS) /C │ICC /C $*.C │ │ │$*.C │ │ ├────────────────────┼────────────────────┼────────────────────┤ │.C.EXE │$(CC) $(CFLAGS) $*.C│ICC $*.C │ ├────────────────────┼────────────────────┼────────────────────┤ │.ASM.OBJ │$(AS) $(AFLAGS) $*; │MASM $*; │ └────────────────────┴────────────────────┴────────────────────┘ NOTE 1. The first two rules automatically compile and link C programs. 2. The last rule automatically assembles programs. ═══ 16.9. Directives ═══ Using directives, you can construct description files similar to batch files. NMAKE provides directives that: o Conditionally execute commands o Display error messages o Include the contents of other files o Turn some NMAKE options on or off Each directive begins with an exclamation point ( ! ) in the first column of the description file. Spaces can be placed between the exclamation point and the directive keyword. The list below describes the directives: !IF Executes the statements between the !IF keyword and the next !ELSE or !ENDIF directive if evaluates to a nonzero value. The used with the !IF directive can consist of integer constants, string constants, or exit codes returned by programs. Integer constants can use the C unary operators for numerical negation ( - ), one's complement ( ~ ), and logical negation ( ! ). You can also use any of the C binary operators listed below: Operator Description + Addition - Subtraction * Multiplication / Division % Modulus & Bitwise AND | Bitwise OR ^^ Bitwise XOR && Logical AND || Logical OR << Left shift >> Right shift == Equality != Inequality < Less than > Greater than <= Less than or equal to >= Greater than or equal to Note: You can use parentheses to group expressions. Values are assumed to be decimal values unless specified with a leading 0 (octal) or leading 0x (hexadecimal). Strings are enclosed by quotation marks ( " ). You can use the equality ( ==) and inequality ( != ) operators to compare two strings. You can invoke a program in an expression by enclosing the program name in square brackets ( [ ] ). The exit code returned by the program is used in the expression. !ELSE Executes the statements between the !ELSE and !ENDIF directives if the statements preceding the !ELSE directive were not executed. !ENDIF Marks the end of the !IF, !IFDEF, or !IFNDEF block of statements. !IFDEF Executes the statements between the !IFDEF keyword and the next !ELSE or !ENDIF directive if is defined in the description file. If a macro has been defined as null, it is still considered to be defined. !IFNDEF Executes the statements between the !IFNDEF keyword and the next !ELSE or !ENDIF directive if is not defined in the description file. !UNDEF Undefines a previously defined macro. !ERROR Prints text and then stops execution. !INCLUDE Reads and evaluates the file before continuing with the current description file. If is enclosed by angle brackets (<>), NMAKE searches for the file in the directories specified by the INCLUDE macro; otherwise, it looks only in the current directory. The INCLUDE macro is initially set to the value of the INCLUDE environment variable. !CMDSWITCHES {+|-} Turns on or off one of four NMAKE options: /D, /I, /N, and /S. If no options are specified, the options are reset to the values they had when NMAKE was started. To turn an option on, precede it with a plus sign (+); to turn it off, precede it with a minus sign (-). This directive updates the MAKEFLAGS macro. See Special Macros. ═══ 16.9.1. Directives Example ═══ !INCLUDE !CMDSWITCHES +D WINNER.EXE:WINNER.OBJ !IFDEF DEBUG ! IF "$(DEBUG)"=="y" LINK /CO WINNER.OBJ; ! ELSE LINK WINNER.OBJ; ! ENDIF !ELSE ! ERROR Macro named DEBUG is not defined. !ENDIF The directives in this example do the following: o The !INCLUDE directive causes the file INFRULES.TXT to be read and evaluated as if it were part of the description file. o The !CMDSWITCHES directive turns on the /D option, which displays the dates of the files as they are checked. o If WINNER.EXE is out-of-date with respect to WINNER.OBJ, the !IFDEF directive checks to see whether the macro DEBUG is defined. If it is defined, the !IF directive checks to see whether it is set to y. If it is, the linker is invoked with the /CO option; otherwise, it is invoked without the /CO. If the DEBUG macro is not defined, the !ERROR directive prints the message and NMAKE stops executing. ═══ 16.9.2. Pseudotargets ═══ A "pseudotarget" is a target in a description block that is not a file. Instead, it is a name that serves as a "handle" for building a group of files or executing a group of commands. In the following example, UPDATE is a pseudotarget: UPDATE: *.* !copy $** A:\PRODUCT When NMAKE evaluates a pseudotarget, it always considers the dependents to be out-of-date. In the description above, NMAKE copies each of the dependent files to the specified drive and directory. NMAKE predefines several pseudotargets for special purposes. See Predefined Pseudotargets. ═══ 16.9.3. Predefined Pseudotargets ═══ NMAKE predefines several pseudotargets that provide special rules within a description file: ═══ 16.9.3.1. .SILENT Pseudotarget ═══ Syntax: .SILENT : dependents... This pseudotarget suppresses the display of executed commands for a single description block. The /S option does the same thing for all description blocks. See Suppress Command Display (/S). ═══ 16.9.3.2. .IGNORE Pseudotarget ═══ Syntax: .IGNORE : dependents... This pseudotarget ignores exit codes returned by programs for a single description block. The /I option does the same thing for all description blocks. See Ignore Exit Codes (/I). ═══ 16.9.3.3. .SUFFIXES Pseudotarget ═══ Syntax: .SUFFIXES : extensions... This pseudotarget defines file extensions to try when NMAKE needs to build a target file for which no dependents are specified. NMAKE searches the current directory for a file with the same name as the target file and an extension in . If NMAKE finds such a file, and if an inference rule applies to the file, NMAKE treats the file as a dependent of the target. The .SUFFIXES pseudotarget is predefined as .SUFFIXES : .OBJ .EXE .C .ASM To add extensions to the list, specify .SUFFIXES : followed by the new extensions. To clear the list, specify .SUFFIXES: Note: Only those extensions specified in .SUFFIXES can have inference rules. NMAKE ignores inference rules unless the extensions have been specified in a .SUFFIXES list. ═══ 16.9.3.4. .PRECIOUS Pseudotarget ═══ Syntax: .PRECIOUS : targets... This pseudotarget tells NMAKE not to delete a target even if the commands that build it are terminated or interrupted. This pseudotarget overrides the NMAKE default. By default, NMAKE deletes the target if it cannot be sure that the target was built successfully. For example, .PRECIOUS : TOOLS.LIB TOOLS.LIB : A2Z.OBJ Z2A.OBJ command : If the commands to build TOOLS.LIB are interrupted, leaving an incomplete file, NMAKE does not delete the partially built TOOLS.LIB. Note: The pseudotarget .PRECIOUS is useful only in limited circumstances. Most professional development tools have their own interrupt handlers and "clean up" when errors occur. ═══ 16.10. In-Line Files ═══ You may need to issue a command in the description file with a list of arguments exceeding the command-line limit of the operating system. Just as NMAKE supports the use of command files, it can also generate in-line files which are read as response files by other programs. To generate an in-line file, use the following syntax for your description block: target : dependents command @<<[filename] in-line file text << [KEEP | NOKEEP] All of the text between the two sets of double less than signs (<<) is placed into an in-line file and given the name . You can refer to the in-line file at a later time by using . If is not given, NMAKE gives the file a unique name in the directory specified by the TMP environment variable if it is defined. Otherwise, NMAKE creates a unique file name in the current directory. The in-line file can be temporary or permanent. If you do not specify otherwise, or if you specify the keyword NOKEEP, the in-line file is temporary. Specify KEEP to retain the file. Note: The at sign (@) is not part of the NMAKE syntax but is the typical character used by utilities (such as LINK386) to designate a file as a response file. ═══ 16.10.1. In-Line Files Example ═══ MATH.LIB : ADD.OBJ SUB.OBJ MUL.OBJ DIV.OBJ LIB @<< MATH.LIB -+ADD.OBJ-+SUB.OBJ-+MUL.OBJ-+DIV.OBJ listing << The above example creates an in-line file and uses it to invoke the Library Manager (LIB). The in-line file is used as a response file by (LIB). It specifies which library to use, the commands to execute, and the listing file to produce. The in-line file contains the following: MATH.LIB -+ADD.OBJ-+SUB.OBJ-+MUL.OBJ-+DIV.OBJ listing Because no file name is listed after the LIB command, the in-line file is given a unique name and placed into the current directory (or the directory defined by the TMP environment variable). ═══ 16.10.2. Escape Characters ═══ NMAKE uses the following punctuation characters in its syntax: ┌──────┬──────┬──────┬──────┬──────┬──────┐ │( │) │# │$ │^ │\ │ ├──────┼──────┼──────┼──────┼──────┼──────┤ │{ │} │! │@ │- │ │ └──────┴──────┴──────┴──────┴──────┴──────┘ To use one of these characters in a command and not have it interpreted by NMAKE, use a caret ( ^ ) in front of the character. For example, BIG^#.C is treated as BIG#.C With the caret, you can include a literal newline character in a description file. This capability is useful in macro definitions, as in the following example: XYZ=abc^ def The effect is equivalent to the effect of assigning the C-style string abc\ndef to the XYZ macro. Note that this effect differs from the effect of using the backslash ( \ ) to continue a line. A newline character that follows a backslash is replaced with a space. NMAKE ignores a caret that is not followed by any of the characters it uses in its syntax. A caret that appears within quotation marks is not treated as an escape character. Note: The escape character cannot be used in the command portion of a dependency block. ═══ 16.11. Characters That Modify Commands ═══ Any of three characters can be placed in front of a command to modify how the command is run: - (dash) Turns off error checking for the command @ (at sign) Suppresses display of the command ! (exclamation point) Executes the command for each dependent file NOTE 1. Spaces can separate the modifying character from the command. Any command on a separate line - whether modified or not - must be indented by one or more spaces or tabs. 2. You can use more than one character to modify a single command. ═══ 16.11.1. Turn Error Checking Off (-) ═══ Syntax: -[n] command The /I option globally turns command error-checking off. The dash (-) command modifier overrides the global setting to turn error checking off for commands individually. This modifier is used in two ways: o A dash without a number turns off all error checking. o A dash followed by a number causes NMAKE to abort only if the exit code returned by the command is greater than the number. See Ignore Exit Codes (/I). ═══ 16.11.2. Dash Command Modifier Examples ═══ LIGHT.LST : LIGHT.TXT - FLASH LIGHT.TXT In the example above, NMAKE never ends, regardless of the exit code returned by FLASH. LIGHT.LST : LIGHT.TXT -1 FLASH LIGHT.TXT In the example above, NMAKE ends if the exit code returned by FLASH is greater than 1. ═══ 16.11.3. Suppress Command Display (@) ═══ Syntax: @ command The /S option globally suppresses the display of commands while NMAKE is running. The at sign (@) modifier suppresses the display for individual commands. Note: Regardless of the /S option or the @ modifier, output generated by the command itself always appears. See Suppress Command Display (/S). ═══ 16.11.4. At Sign (@) Command Modifier Example ═══ Suppress Command Display (@) SORT.EXE:SORT.OBJ @ ECHO sorting The command line calling the ECHO command is not displayed. The output of the ECHO command, however, is displayed. ═══ 16.11.5. Execute Command for Dependents (!) ═══ Syntax: ! command The exclamation-point command modifier causes the command to be executed for each dependent file if the command uses one of the special macros $? or $**. The $? macro refers to all dependent files out-of-date with respect to the target. The $** macro refers to all dependent files in the description block. See Special Macros. ═══ 16.11.6. Exclamation Point (!) Command Modifier Examples ═══ LEAP.TXT : HOP.ASM SKIP.BAS JUMP.C ! print $** lpt1: The example above executes the following three commands, regardless of the modification dates of the dependent file: print HOP.ASM lpt1: print SKIP.BAS lpt1: print JUMP.C lpt1: LEAP.TXT : HOP.ASM SKIP.BAS JUMP.C ! print $? lpt1: The example above executes the print command only for those dependent files with modification dates later than that of the LEAP.TXT file. If HOP.ASM and JUMP.C have modification dates later than LEAP.TXT, the following two commands are executed: print HOP.ASM lpt1: print JUMP.C lpt1: ═══ 16.11.7. EXTMAKE Syntax ═══ Description files can use a special syntax to determine the drive, path, base name, and extension of the first dependent file in a description block. This syntax is called the "extmake" syntax. The characters %s represent the complete file specification of the first dependent file. Various parts of the file specification are represented using the syntax %|partsF where is a combination of the following letters: d Drive p Path f Base name e Extension For example, to specify the drive and path name of the first dependent file in a description block, use: %|dpF The percent symbol (%) is a replacement in DOS and OS/2 command lines. To use the percent symbol in command-line arguments, use a double percent (%%). ═══ 16.12. Macros and Inference Rules in TOOLS.INI ═══ You can place either macros or inference rules in your TOOLS.INI file. NMAKE looks for the TOOLS.INI file first in the current directory and then in the directory indicated by the INIT environment variable. If NMAKE finds a TOOLS.INI file, it looks for the following tag: [nmake] You can place macros and inference rules below this tag in the same format you would use in a description file. If a macro or inference rule is defined in both the TOOLS.INI file and the description file, the definition in the description file takes precedence. Also, if you use the /R option, the TOOLS.INI file is ignored. ═══ 16.12.1. TOOLS.INI Example ═══ [nmake] CFLAGS=/ss /ms /Gd- .C.OBJ: $(CC) -c $(CFLAGS) $*.C These lines in the TOOLS.INI file do the following: o Define the CFLAGS macro as "/ss /ms /Gd-" o Redefine the predefined inference rule to build .OBJ files from .C source files ═══ 17. Quick Information (KwikINF) ═══ KwikINF provides you with a quick and convenient method of accessing information in online documents stored in the OS/2 BOOKSHELF from anywhere on the desktop, with the exception of DOS or WIN-OS/2 sessions. When KwikINF has been started, you can open a dialog with KwikINF by pressing a user-selectable hot key. Until you configure KwikINF, your KwikINF hot key is ALT+Q. The KwikINF window includes a Configure push button. This opens another dialog with KwikINF: the Configure KwikINF window. The KwikINF window also allows you to initiate searches for text strings in online documents of choice. ═══ 17.1. Automatic Text Retrieval ═══ The KwikINF window includes a Search String entry field. You can specify the text string you want KwikINF to search for. Or, under certain conditions, this entry field automatically contains the word located under the cursor when you press your KwikINF hot key. This text retrieval feature is available from OS/2 full-screen and Presentation Manager (PM) multi-line entry (MLE) fields. This feature is also available from PM AVIO and VIO windows. Communication Manager's 3270 emulator is a common example of a PM AVIO window. An OS/2 Window is a VIO window. This means that if, for example, you open an OS/2 Window and start an OS/2 text-based application, KwikINF will automatically retrieve the word under the cursor when you press your KwikINF hot key. This automatic text-retrieval feature is not available from graphic-text PM windows. ═══ 17.2. BOOKSHELF Online Documents ═══ The KwikINF window includes a Volume to Search list box of all online documents stored in the OS/2 BOOKSHELF subdirectories. KwikINF initiates searches for information in any online document in this list. The BOOKSHELF is an environment variable, set in CONFIG.SYS, that contains a list of subdirectories containing online documents created as viewable .INF files with the Information Presentation Facility (IPF). The BOOKSHELF environment variable is set as follows: SET BOOKSHELF=;...;; Online documents for OS/2 (for example, the Command Reference) are stored in the \OS2\BOOK subdirectory of the drive on which OS/2 is installed. Online documents for the OS/2 Toolkit (for example, the Programming References) are stored in the \TOOLKIT\BOOK subdirectory of the drive specified during installation of the online programming information. As an example, after installation of OS/2 and the Toolkit, the BOOKSHELF environment variable is set as follows: SET BOOKSHELF=C:\OS2\BOOK;D:\TOOLKIT\BOOK; Where c: is the drive where OS/2 is installed and D: is the drive where the Toolkit is installed. The online document where KwikINF looks for the Search String is selected from the Volume to Search list box by KwikINF or by you. KwikINF selects the Volume to Search by looking for the text string that has a matching entry in the KwikINF index file or, if there is no matching entry in the index file, in the Default Volume you have selected in the Configure KwikINF window. ═══ 17.2.1. Index Files for Rapid Search ═══ The KwikINF index file provides a rapid-search mechanism for locating specific kinds of information in online documents in the BOOKSHELF. The KwikINF index file consists of one or more concatenated files stored in the BOOKSHELF and defined by the HELPNDX variable in CONFIG.SYS as shown in the following example: SET HELPNDX=EPMKWHLP.NDX where EPMKWHLP.NDX is the KwikINF index file for the OS/2 Toolkit. As an example, the following excerpt from the KwikINF index file for the OS/2 Toolkit: EXTENSIONS: * DESCRIPTION: IBM Developer's Toolkit for OS/2 (IPF*, view ipfc20.inf ~) (WinCreateWindow, view pmwin.inf ~) is used by KwikINF to quickly locate Search String entries with the prefix IPF in the IPF-viewable file IPFC20.INF. and to quickly locate the specific Search String entry WinCreateWindow in the IPF-viewable file PMWIN.INF. The first token in a rapid-search string is a specific text string (for example, WinCreateWindow) or prefix wildcard (for example, IPF*). It is also used as the text-string you want VIEW.EXE to locate within the online document. The second token is the name of the IPF file viewer (VIEW.EXE). The third token is a parameter for VIEW.EXE: the name of the .INF file that contains the online document. Currently, the fourth token is not being used and it is treated as a comment. ═══ 17.2.2. Enabling Online Documents ═══ You can enable any online document for KwikINF by: 1. Creating the online document as a viewable .INF file using the Information Presentation Facility (IPF). 2. Appending the name of the subdirectory where it is stored to the BOOKSHELF in CONFIG.SYS. 3. Creating an index file to support the KwikINF rapid-search mechanism, storing it in the BOOKSHELF, and adding it to the HELPNDX variable in CONFIG.SYS. For example, you can enable your online document MYDOC stored in MYSUBDIR subdirectory for KwikINF by: 1. Compiling the tagged source for MYDOC with the IPF compiler by entering: IPFC MYDOC /INF 2. Modifying the BOOKSHELF statement in CONFIG.SYS as follows: SET BOOKSHELF=...;C:\MYSUBDIR; 3. Creating MYINDEX file in MYSUBDIR as shown below: /* C style comments and blank lines are acceptable */ /* specific file extensions may be specified here */ EXTENSIONS: * /* a title may be placed here */ DESCRIPTION: Any custom KwikINF index file /* rapid-search strings */ (thisfunction, view mydoc.inf ~) (my*, view mydoc.inf ~) 4. Modifying the HELPNDX variable in CONFIG.SYS as follows: SET HELPNDX=EPMKWHLP.NDX+MYINDEX.NDX For more information on creating an IPF-viewable online document, see the IPF Reference in the Toolkit Information folder. ═══ 17.3. Using KwikINF ═══ KwikINF is installed as a program object in the OS/2 Toolkit Information folder. You start KwikINF by double-clicking on the KwikINF object or by entering KwikINF from the command line of an OS/2 Window. You can start KwikINF automatically when you start OS/2 by placing a shadow of the KwikINF object in the Startup folder in the OS/2 System folder on the desktop. You shadow an object by pressing CTRL + SHIFT while dragging the object. KwikINF installs a PM system hook to monitor keystrokes in PM sessions and OS/2 character device monitors to monitor keystrokes in OS/2 full-screen sessions. KwikINF will install only one copy of the hook and monitors, even if you attempt to re-start KwikINF. When KwikINF has been started, you can initiate searches for text strings in online documents of choice by pressing a user-selectable hot key. Note: You cannot initiate searches for text strings in online documents from DOS or WIN-OS/2 sessions. Until you configure KwikINF, your KwikINF hot key is ALT+Q. You configure KwikINF by pressing your KwikINF hot key and then pressing the Configure push button to open the Configure KwikINF window. Note: When you start KwikINF by double-clicking on the KwikINF object in the Toolkit Information folder, a message box tells you what hot key opens the KwikINF window. This technique can also be used to determine what your current KwikINF hot key is, after KwikINF has been started. How you initiate a search for information in online documents is dependent on where you are on the desktop when you press the KwikINF hot key: o From an OS/2 full-screen session, a PM VIO or AVIO window, or PM MLE: position the cursor on the string you want to search for and press the KwikINF hot key. KwikINF retrieves the word at the cursor. If you have configured KwikINF to display the KwikINF window when the KwikINF hot key is pressed, KwikINF automatically places the retrieved word in the Search String entry field of the KwikINF window. When you press the Search push button or Enter, KwikINF displays the information. If you have configured KwikINF to bypass the KwikINF window when the KwikINF hot key is pressed, KwikINF automatically displays the information. If no word is under the cursor, the previous Search String is used. If no previous Search String exists, KwikINF displays the Contents of the Default volume to search. o From a graphic-text PM window: press the KwikINF hot key, then type the string you want to search for in the Search String entry field of the KwikINF window. The KwikINF text-retrieval feature is not available from graphic-text PM windows. The online document where KwikINF looks for the text string is selected from the Volume to Search list box by KwikINF or by you. To open the online document to the panel that contains the information, press the Search push button or press Enter. ═══ 17.3.1. KwikINF From the Command Line ═══ You can start, terminate, and configure KwikINF from the command line in an OS/2 Window by entering: KwikINF [no options] [/C] [/T] [/?] where: no options starts KwikINF. After entering this command, the default KwikINF hot key (ALT + Q) is enabled. /T terminates KwikINF and disables the KwikINF hot key. /C opens the Configure KwikINF window. Use this window to select another KwikINF hot key, to select a default online document from the BOOKSHELF to search, and to select the activation behavior of the KwikINF window. /? displays the following information. Usage: KwikINF [Option] Option Description /C Configure KwikINF /T Terminate KwikINF /? This short help list ═══ 17.3.2. Configuring KwikINF ═══ You configure KwikINF through the Configure KwikINF window. KwikINF displays this window when you press the Configure push button on the KwikINF window or when you enter the following from the command line of an OS/2 Window: KwikINF /C The Configure KwikINF window allows you to: o Select another KwikINF hot key. o Specify the number of OS/2 full-screen sessions enabled for KwikINF. o Specify the name of the default online document KwikINF searches. o Select the activation behavior of the KwikINF window. Use the push buttons on the Configure KwikINF window as follows: o Press OK to enable your configuration choices. o Press Cancel to cancel your configuration choices. This closes the Configure KwikINF window. o Press Help to get general help for the current window. ═══ 17.3.3. Activation Key Sequence ═══ The Activation Key Sequence provides a selectable list of KwikINF hot keys. To access the list, single-click on the down arrow. Select the KwikINF hot key of your choice from the following list: CTRL + A CTRL + H CTRL + Q ALT + A ALT + Q (this is the default hot key) The KwikINF hot key initiates searches for information in online documents from anywhere on the desktop, with the exception of DOS or WIN-OS/2 sessions. ═══ 17.3.4. Full Screen Sessions ═══ Use the Number of Fullscreen Sessions to Monitor spin button to specify the number of OS/2 full-screen sessions enabled for KwikINF. KwikINF is implemented as a PM system hook to monitor keystrokes in PM sessions and as OS/2 character device monitors to monitor keystrokes in OS/2 full-screen sessions. For OS/2 full-screen sessions, KwikINF will monitor only the number of sessions specified here. ═══ 17.3.5. Default Volume to Search ═══ Use the Default Volume to Search single selection list box to specify which online document in the BOOKSHELF you want KwikINF to search by default. KwikINF looks for the Search String in this online document, when there is no matching entry in the KwikINF index file. Select the online document, then select the OK push button to activate the selection. ═══ 17.3.6. Activation Behavior ═══ Use the Activation Behavior radio buttons to select the behavior of the KwikINF window. The KwikINF window can be displayed or bypassed when the user presses the KwikINF hot key after KwikINF has been installed. o Select the Display KwikINF Window radio button to tell KwikINF that you always want the KwikINF window to be displayed when you press the KwikINF hot key to initiate searches for information. This is the default behavior of the KwikINF window. When the you press the KwikINF hot key, you can initiate a search for the text string that may be automatically displayed in the Search String entry field or for the text string that you enter into this field. You can also specify which online document in the BOOKSHELF KwikINF searches for the text string. o Select the Bypass KwikINF Window radio button to tell KwikINF that you do not want the KwikINF window to be displayed when you press the KwikINF hot key to initiate searches for information. This is typically used when working under conditions where the KwikINF automatic text-retrieval feature is available. When you press the KwikINF hot key, KwikINF automatically looks for the text string under the cursor in the online document that has a matching entry in the KwikINF index file or, if there is no matching entry in the index file, in the Default volume selected from the Configure KwikINF window. You configure KwikINF by pressing the Configure push button in the KwikINF window. To configure KwikINF when this window is bypassed, press SHIFT + your KwikINF hotkey to display the Configure KwikINF window. ═══ 17.4. Searching Using the KwikINF Window ═══ If you have configured KwikINF to display the KwikINF window (this is the default condition), the KwikINF window is displayed when you press your KwikINF hot key. The KwikINF window allows you to search for a text string in an online document in the OS/2 BOOKSHELF. The text string is typed by you in the Search String entry field or is automatically retrieved by KwikINF, under certain conditions, from under the cursor when you press your KwikINF hot key. The online document that KwikINF searches for the text string is selected from the Volume to Search list box by KwikINF or by you. KwikINF selects the Volume to Search by looking for the text string that has a matching entry in the KwikINF index file or, if there is no matching entry in the index file, in the Default Volume you have selected in the Configure KwikINF window. Or you can override KwikINF's selection of the Volume to Search by making your own selection from the list box. To initiate the search for the text string in the online document, press the Search push button or press Enter. If the search is successful, KwikINF opens the online document to the online panel that contains the information and displays a window with a title bar that matches the search string. If the search is not successful, you can search any online document for the information by following this procedure: o Clear the Search String entry field. o Select an online document from the Volume to Search list box. The Contents window of the online document appears. o Select Services from the menu bar. o Select Search from the Services pull down menu. The Search help window appears. o Type the text string, then select the All libraries radio button. o Select the Search push button or press Enter. Use the push buttons on the KwikINF window as follows: o Press Search to initiate the search for the text string in the Search String entry field in the selected online document. o Press Cancel to cancel the request to search for the text string and to close the KwikINF window. o Press Configure to display the Configure KwikINF window. o Press Help to get general help for the current window. ═══ 17.4.1. Search String Entry Field ═══ KwikINF searches for the text string in this entry field in the selected online document in the OS/2 BOOKSHELF. Under certain conditions, KwikINF automatically retrieves the word under the cursor when you press your KwikINF hot key. Letters, numbers, underscores, and the pound sign are retrievable by KwikINF. Blank spaces and other special characters are used as delimiters and are not retrievable by KwikINF. You may also type any text string you want into this field. All characters are valid in the entry field to allow for special search criteria. ═══ 17.4.2. VOLUME TO SEARCH List Box ═══ The KwikINF window includes a list box of all online documents stored in the OS/2 BOOKSHELF subdirectories. KwikINF initiates searches for information in any online document in this list. The online document where KwikINF looks for the Search String is selected from the Volume to Search list box by KwikINF or by you. KwikINF selects the Volume to Search by looking for the text string that has a matching entry in the KwikINF index file or, if there is no matching entry in the index file, in the Default Volume you have selected in the Configure KwikINF window. Or you can override KwikINF's selection of the Volume to Search by making your own selection from the list box. You can also open and display the Contents of an online document by double-clicking on an entry in this list box. ═══ 17.4.3. KwikINF Keys Help ═══ Use your KwikINF hot key (ALT+Q or the hot key you select from the Configure KwikINF window) to display the KwikINF window. You can also use your KwikINF hot key to initiate a search for a text string automatically, when you configure KwikINF to bypass the KwikINF window. To re-configure KwikINF, when you have configured KwikINF to bypass the KwikINF window, press SHIFT + your KwikINF hot key. To determine what your KwikINF hot key is, double-click on the KwikINF program object in the OS/2 Toolkit Information folder. ═══ 18. Resource Compiler ═══ The OS/2 Resource Compiler (RC) is an application-development tool that lets you add application resources, such as message strings, pointers, menus, and dialog boxes, to the executable file of your application. The Resource Compiler is primarily intended to prepare data for OS/2 applications that use functions such as WinLoadString, WinLoadPointer, WinLoadMenu, and WinLoadDlg. These functions load resources from the executable file of your application or another specified executable file. The application can then use the loaded resources as needed. The Resource Compiler and the resource functions let you quickly define and/or modify application resources without recompiling the application itself. That is, RC can modify the resources in an executable file at any time without affecting the rest of the file. This means that you can create custom applications from a single executable file - you just use RC to add the custom resources you need to each application. The Resource Compiler is especially important for international applications because it lets you define all language-dependent data, such as message strings, as resources. Preparing the application for a new language is simply a matter of adding new resources to the existing executable file. Note: Make sure the file RCPP.EXE (the Resource Compiler preprocessor) is available for the use of the Resource Compiler. It can be in the current directory, or in a directory to which there is a path. ═══ 18.1. Command-Line Options ═══ The following options can be specified on the Resource Compiler command line: -d[=] Define macro to preprocessor -i Include file path -r Create .res file -p Pack - 386 resources will not cross 64K boundaries. -cp (or -k) {|...} -DBCS code page or lead byte information -x[{1|2}] Exepack - compress resources, using method 1 or 2. -cc Country code -h Access Help Leave a blank after the letter when using option -cc, -D, -I , -cp or -k. Upper or lowercase can be used. ═══ 18.1.1. Explanation of Command-Line Options. ═══ The -D option is useful for passing conditional-compilation flags to the preprocessor. The is a sequence of letters, underscore symbols, and digits which does not begin with a digit. The is a sequence of symbols which you want to substitute for the wherever it appears in the input script file. If you omit the =, the will be set to the default value 1. For example, the option -D_3d is equivalent to including at the beginning of the input file this line: #define _3d 1 You can use the -D option up to eight times to define different macros from the command line. The -I option defines paths for files to be included with the source file. The is any path where you want RC to search for files included by the preprocessor #include directive. The must not contain embedded blanks. To include more than one path, code the -I option once for each path. The preprocessor reads paths from the INCLUDE environment after reading the paths you provide with -I options. The -r switch will create in your current directory a binary resource file containing the resources you compile. The -r switch takes no argument. The name given to this binary resource file will be the same as the name of the input resource script file except that the extension will be .RES instead of .RC. When you use -r, you do not bind resources to an executable file. The -p switch is used only when binding resources to an executable. It positions resources so that they do not cross 64K boundaries. The -cp or -k option is used to specify code page information for the resource script file to be compiled. The is a numeric code page value from the Code Page Table. Instead of specifying a code page, you may provide a sequence of pairs of DBCS lead byte code points. Each pair of numbers gives the lower and upper limit of a range of code points which are to be interpreted as DBCS lead bytes. The code page must be valid for the country code in effect: either the default country code or the country specified using the -CC option. The -CC option allows you to specify a country code for the resource script file to be compiled. The is a number from the table. For more information see Code Page Table. The -X option is used only when binding resources to an executable. It causes resources to be compressed. These resources will be decompressed automatically when the resource is accessed. The -X1 option causes Resource Compiler to use the compression algorithm that is compatible with OS/2 2.0, 2.1, and 2.11. The -X2 option causes Resource Compiler to use a compression algorithm that is incompatible with OS/2 2.0, 2.1 and 2.11. The -X2 option will produce smaller executable files that can access resources faster. -x with no number defaults to -X1. When you give the -h switch, Resource Compiler will display on your screen a summary of the available options and environment variables that it uses. When you give -h, Resource Compiler does not read any input files. This is equivalent to entering on the command line "RC" with no operands. ═══ 18.1.2. Help ═══ To display Resource Compiler help, type RC at the prompt, with no parameters. The appropriate copyright statement will be displayed, along with a list of Resource Compiler options. You can also display this list by using the command-line option -h. Usage: rc [] <.RC input file>[<.EXE output file>] -d defname - Preprocessor define -Ddefname - Preprocessor define -i - Include file path -r - Create .res file -x[1|2] - Exepack-compress resources using method 1or 2 -cc cc - country code -p - Pack - 386 resources will not cross 64K boundaries -cp cp | lb,tb,...- DBCS codepage or lead/trail byte information -h - Access Help Environment variables: DBCS=cp | lb,tb,... TMP=temporary file path TEMP=temporary file path INCLUDE=include file path Note: Option -X2 will produce executable files that are incompatible with OS/2 2.0, 2.1, and 2.11. ═══ 18.2. Resource Script Files ═══ This topic describes the resource script file used to define your application resources and explains how to compile the file and add the resources to your executable file. Use the Resource Compiler to perform the following actions: o Create a resource script file. o Compile the file. o Add the file to the executable file of your application (optional). The following sections describe the resource script file and the RC program. Resource Script Files A resource script file consists of one or more resource statements that define the type, identifier, and data for each resource. For example, the following multiple-line resource statement defines a menu to be used with an application: MENU 1 BEGIN MENUITEM "Alpha", 101 MENUITEM "Beta", 102 END A resource script file is a text file you can create by using an ordinary text editor. Since some resources may contain binary data that cannot be created using a text editor, many resource statements let you specify additional files to include when compiling the resource script file. For example, the following statement defines an icon and specifies the file MYICON.ICO as containing the icon data: ICON 1 myicon.ico Directives A resource script file can also contain directives. For example, the following directive includes the header file OS2.H when RC processes the resource script file: #include Resource script files typically have the .RC filename extension. .RC is the default extension; use it for all your resource script files. Note: Although the Resource Compiler is C-like in syntax, it is not a C compiler. Use only the Resource Compiler statements. ═══ 18.3. Directives ═══ A directive is a Resource Compiler statement that carries out a task such as including a header file, defining constants, or conditionally compiling portions of the resource script file. Directives elif Directive else Directive endif Directive if Directive ifdef Directive ifndef Directive ═══ 18.3.1. Using the Resource Compiler ═══ The Resource Compiler (RC) compiles a resource script file to create a new file called a binary resource file. The binary resource file can be added to the executable file of the application, replacing any existing resources in that file. You can start RC in any of three ways. o Compile and add a resource definition file to an executable file o Compile a resource script file o Add a binary resource file to an executable file The RC command line has the following three basic forms: rc resource-script-file [executable-file] rc resource-file [executable-file] rc -r resource-script-file [resource-file] Note: The third option does not add to the executable file. The resource-script-file field must be the filename of the resource script file to be compiled. If the file is not in the current directory, you must provide a full path. If you provide a filename without specifying a filename extension, RC automatically appends the .RC extension to the name. The executable-file field must be the name of the executable file to receive the compiled resources. This is a file having a filename extension of either .EXE or .DLL. If the file is not in the current directory, you must provide a full path. If you omit the executable-file field, RC adds the compiled resources to the executable file that has the same name as the resource script file but which has the .EXE filename extension. If you specify the executable-file field but omit the filename extension, RC will append the .EXE extension. If this executable file does not exist, RC displays an error message. The -r option directs RC to compile the resource script file without adding it to an executable file. You can use this option to prepare a binary resource file that you can add to an executable file at a later time. If you do not explicitly name a binary resource file along with the -r option, RC uses the same name as the resource script file but with the .RES filename extension. The resource-file field must be the name of the binary resource file to be added to the executable file. If the binary resource file does not already exist, RC creates it; otherwise, RC replaces the existing file. If the file is not in the current directory, you must provide a full path. The binary resource file must have the .RES filename extension. For example, to compile the resource script file EXAMPLE.RC, and add the result to the executable file EXAMPLE.EXE, use the following command: rc example You do not need to specify the .RC extension. RC creates the binary resource file EXAMPLE.RES and adds the compiled resource to the executable file EXAMPLE.EXE. To compile the resource script file EXAMPLE.RC into a binary resource file without adding the resources to an executable file, use the following command: rc -r example The compiler creates the binary resource file EXAMPLE.RES. To create a binary resource file that has a name different from the resource script file, use the following command: rc -r example newfile.res To add the compiled resources in the binary resource file EXAMPLE.RES to an executable file, use the following command: rc example.res To specify the name of the executable file, if the name is different from the resource file, use the following command: rc example.res newfile.exe To add the compiled resources to a dynamic-link-library (.DLL) file, use the following command: rc example.res dynalink.dll In addition to -r, RC offers two other command-line options: -cp and -cc. The -cp option lets you specify a code-page identifier or DBCS lead byte information. The -cc option lets you specify a country code. The syntax is as follows: -cp {codepage-id | lead-byte-start, lead-byte-end,...} -cc country-code The lead-byte-start and lead-byte-end fields give the upper and lower limits of each interval of DBCS lead bytes which you are defining for the code page. You may specify these values instead of a codepage-id. The codepage-id or country-code field contains one of the valid code page or country codes, for example: ═══ 18.3.2. Code Page Table ═══ ┌────────────────────┬────────────────────┬────────────────────┐ │CODE-PAGE ID │COUNTRY CODE │MEANING │ ├────────────────────┼────────────────────┼────────────────────┤ │932 │81 │Japan │ ├────────────────────┼────────────────────┼────────────────────┤ │934 │82 │Korea │ ├────────────────────┼────────────────────┼────────────────────┤ │936 │86 │China │ ├────────────────────┼────────────────────┼────────────────────┤ │938 │88 │Taiwan │ └────────────────────┴────────────────────┴────────────────────┘ ═══ 18.4. Defining Constants ═══ The -d option lets you define up to eight symbolic constants on the command line. The syntax is as follows: -d defname[=value] In the previous example, defname is a name, and value is an integer constant, or an expression. The -d option is useful for passing conditional-compilation flags to the RC preprocessor. The following example specifies a Japanese code-page identifier and also defines two symbolic constants to be passed to the preprocessor as conditional-compilation flags. rc -cp 932 -d DEBUG -d VERSION=2 example Note: To process directives in the resource script file, RC uses the files RCPP.EXE and RCPP.ERR. Be sure that these files are in the current directory or in a directory specified by your PATH environment variable. RC creates many temporary files and writes them to the directory indicated by the TMP or TEMP environment variable. If RC cannot write these temporary files to this directory, it writes them to the current directory. ═══ 18.4.1. About Resource Statements ═══ Each resource statement consists of one or more keywords, numbers, character strings, constants, or filenames. You combine these to define the resource type, identifier, and data. Keywords are words that have a special meaning to the Resource Compiler. In a statement, keywords specify the resource type, the load and memory options, and the beginning and end of nested statements. You can use the RC keywords only as specified in the statement syntax. Keywords, except for those specifying directives, can be any combination of uppercase and lowercase letters. Note that the curly braces, { and }, are reserved characters. You can use them in place of the BEGIN and END keywords. Numbers are integers that represent coordinates, dimensions, styles, and other numeric data. You can specify numbers in decimal, octal, or hexadecimal notation: Decimal numbers must contain decimal digits but can start with a minus sign (-) when they represent a negative number. Hexadecimal numbers must contain hexadecimal digits (uppercase or lowercase) and must start with the characters 0x. Octal numbers are similar to hexadecimal numbers, except that a lowercase letter o replaces the x. The following example shows several numbers represented in decimal, octal, and hexadecimal notation: ┌────────────────────┬────────────────────┬────────────────────┐ │DECIMAL │OCTAL │HEXADECIMAL │ ├────────────────────┼────────────────────┼────────────────────┤ │1 │0o1 │0x1 │ ├────────────────────┼────────────────────┼────────────────────┤ │10 │0o12 │0xA │ ├────────────────────┼────────────────────┼────────────────────┤ │255 │0o377 │0xFF │ ├────────────────────┼────────────────────┼────────────────────┤ │-1 │0o177777 │0xFFFF │ ├────────────────────┼────────────────────┼────────────────────┤ │65535 │0o177777 │0xFFFF │ └────────────────────┴────────────────────┴────────────────────┘ Statements that create controls in dialog windows and menu items in menus require that you specify an identifier for each control or menu item. Statements that create controls also require you to specify coordinates and dimensions. You specify identifiers, coordinates, and dimensions using integers in the range -32768 through 32767. Optionally, you can use simple expressions that evaluate to integers from 0 through 65535; this lets you specify identifiers, dimensions, and coordinates that are relative to those of the corresponding dialog window or menu. Character strings represent names, labels, titles, and messages. A character string consists of one or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark (") is required in a string, you must include the double quotation mark twice. The meaning of each character value (that is, the character each value represents) depends on the code page (character set) defined for the resource script file. The Resource Compiler interprets the backslash (\) as an escape character in character strings. You can include any ASCII character in a character string by specifying either \xdd, where dd is the hexadecimal representation of an ASCII character, or \nnn, where nnn is the octal representation of an ASCII character. If a backslash is required in a string, you must include the backslash twice. Constants are names that have been assigned values by using the define directive. A constant can represent a number, a character string, or other data. Most resource statements in a resource script file use constants, and many use the constants defined in the OS/2 header files (for example, os2.h). For this reason, you should always use the include directive to include OS2.H in your resource script file. Filenames are OS/2 filenames. If the specified file is not in the current directory, you must specify the drive, directory, and filename. Resource statements have three basic forms: Single-line statements Multiple-line statements Directives Single-line statements consist of a keyword identifying the resource type, a constant or number specifying the resource identifier, and a filename specifying the file containing the resource data. For example, this ICON statement defines an icon resource: ICON 1 myicon.ico The icon resource has the icon identifier 1. The file MYICON.ICO contains the icon data. Multiple-line statements consist of a keyword identifying the resource type, a constant or number specifying the resource identifier, and, between the BEGIN and END keywords, additional resource statements that define the resource data. For example, this MENU statement defines a menu resource: MENU 1 BEGIN MENUITEM "Alpha", 101 MENUITEM "Beta", 102 END The menu identifier is 1. The menu contains two MENUITEM statements that define the contents of the menu. In multiple-line statements such as DLGTEMPLATE and WINDOWTEMPLATE, RC allows any level of nested statements. For example, the DLGTEMPLATE and WINDOWTEMPLATE statements typically contain a single DIALOG or FRAME statement. These statements can contain any number of WINDOW and CONTROL statements; the WINDOW and CONTROL statements can contain additional WINDOW and CONTROL statements; and so on. The nested statements let you define controls and other child windows for the dialog boxes and windows. If a nested statement creates a child window or control, the parent and owner of the new window is the window created by the containing statement. (FRAME statements occasionally create frame controls whose parent and owner windows are not the same.) Directives consist of the reserved character # in the first column of a line, followed by the directive keyword and any additional numbers, character strings, or filenames. ═══ 18.4.2. Binary Resource Files ═══ The binary resource file created by the Resource Compiler consists of one or more resource entries, each in the following form: struct { UCHAR fResType; USHORT usResType; UCHAR fResID; USHORT resid; USHORT fsOptions; ULONG cb; BYTE bytes[1]; }; The fields in each entry have the following meanings: fRestype Specifies whether the resource-type identifier is a string or an integer. For OS/2, the resource type is always an integer and this field is set to 0xFF. usResType Specifies the resource-type identifier. This value is an integer in the range -32768 through 32767. The following resource types are predefined: RT_ACCELTABLE Accelerator table RT_BITMAP Bitmap RT_CHARTBL Character table RT_DIALOG Dialog template RT_DISPLAYINFO Display information RT_DLGINCLUDE Dialog include-file name RT_FKALONG Long-form function-key area RT_FKASHORT Short-form function-key area RT_FONT Font RT_FONTDIR Font directory RT_HELPSUBTABLE Help subtable RT_HELPTABLE Help table RT_KEYTBL Key table RT_MENU Menu template RT_MESSAGE Error-message table RT_POINTER Mouse-pointer shape RT_RCDATA Binary data RT_STRING String table RT_VKEYTBL Virtual key table fResID Specifies whether the resource identifier is a string or an integer. For OS/2, the resource identifier is always an integer and this field is set to 0xFF. resid Specifies the resource identifier. This value is an integer in the range -32768 through 32767. fsOptions Specifies the load and memory options. This value can be a combination of the following: 0x0010 MOVEABLE resource. If not given, the resource is FIXED. 0x0040 PRELOAD resource. If not given, the resource is LOADONCALL. 0x1000 DISCARDABLE resource. cb Specifies the size of the resource (in bytes). bytes Contains the resource. Note: There is a size limitation of 65,280 bytes for a binary resource file. ═══ 18.5. Statements ═══ The following statements and directives are used by the Resource Compiler (RC): ACCELTABLE Statement ASSOCTABLE Statement AUTOCHECKBOX Statement AUTORADIOBUTTON Statement BITMAP Statement CHECKBOX Statement CODEPAGE Statement COMBOBOX Statement CONTAINER Statement CONTROL Statement CTEXT Statement CTLDATA Statement DEFAULTICON Statement define Directive DEFPUSHBUTTON Statement DIALOG Statement DLGINCLUDE Statement DLGTEMPLATE Statement EDITTEXT Statement elif Directive else Directive endif Directive ENTRYFIELD Statement FONT Statement FRAME Statement GROUPBOX Statement HELPITEM Statement HELPSUBITEM Statement HELPSUBTABLE Statement HELPTABLE Statement ICON Statement (Resource) ICON Statement (Control) if Directive ifdef Directive ifndef Directive include Directive LISTBOX Statement LTEXT Statement MENU Statement MENUITEM Statement MESSAGETABLE Statement MLE Statement NOTEBOOK Statement POINTER Statement PRESPARAMS Statement PUSHBUTTON Statement RADIOBUTTON Statement RCDATA Statement RCINCLUDE Statement RESOURCE Statement RTEXT Statement SLIDER Statement SPINBUTTON Statement STRINGTABLE Statement SUBITEMSIZE Statement SUBMENU Statement undef Directive VALUESET Statement WINDOW Statement WINDOWTEMPLATE Statement ═══ 18.5.1. ACCELTABLE Statement ═══ Syntax: ACCELTABLE acceltable-id [mem-option][code-page] BEGIN key-value, command[, accelerator-options]... . . . END Description The ACCELTABLE statement creates a table of accelerators for an application. An accelerator is a keystroke that gives the user a quick way to choose a command from a menu or carry out some other task. An accelerator table can be loaded when needed from the executable file by using the WinLoadAccelTable function. You can provide any number of ACCELTABLE statements in a resource script file. Each statement must specify a unique table identifier. You can provide any number of accelerator definitions in an accelerator table; however, no two definitions in a table can specify the same key. Each accelerator definition must specify a key value and command. The WinSetAccelTable function used in the application translates the accelerator keystroke into a WM_COMMAND, WM_HELP, or WM_SYSCOMMAND message that has the corresponding command value. The message type depends on the accelerator-option field. acceltable-id Specifies the accelerator-table identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. Each accelerator table in a resource script file must have a unique identifier. mem-option Specifies how the system manages the resource when it is in memory. This value must be one of the following: OPTION Meaning FIXED System keeps the resource at a fixed memory location. MOVEABLE System moves the resource as necessary to compact memory. This is the default option. DISCARDABLE System discards the resource if it is no longer needed. code-page Specifies a code page value. For a list of valid code pages see CODEPAGE Statement. key-value Specifies the character, scan, or virtual-key code of the accelerator key. The meaning depends on the accelerator-options field. The key-value field must be a single character enclosed in double-quotation marks or an integer in the range 0 through 255. If you specify an integer, you must specify the CHAR, SCANCODE, or VIRTUALKEY accelerator option; otherwise, the default option is CHAR. Integers must be in decimal or hexadecimal notation. command Specifies the command value for the corresponding WM_COMMAND, WM_HELP, or WM_SYSCOMMAND message. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to an integer in that range. accelerator-options Specifies the accelerator type. This value can be a combination of the following: VIRTUALKEY Specifies that the key-value field is a virtual-key code. SCANCODE Specifies that the key-value field is a keyboard scan code. CHAR Specifies that the key-value field is a character code. SHIFT Specifies that the user must press the Shift key and the key corresponding to the key-value field to generate the accelerator. CONTROL Specifies that the user must press the Ctrl key and the key corresponding to the key-value field to generate the accelerator. ALT Specifies that the user must press the Alt key and the key corresponding to the key-value field to generate the accelerator. LONEKEY Specifies that the user needs to press only the key corresponding to the key-value field to generate the accelerator. SYSCOMMAND Specifies that the accelerator translates to a WM_SYSCOMMAND message. If you do not include this option, the accelerator translates to a WM_COMMAND message. HELP Specifies that the accelerator translates to a WM_HELP message. If you do not include this option, the accelerator translates to a WM_COMMAND message. Note: VIRTUALKEY, SCANCODE, and CHAR are mutually exclusive. SYSCOMMAND and HELP are also mutually exclusive. Comments If two accelerators use the same key with different Shift, Control, or ALT options, you should specify the more restrictive accelerator first in the table. For example, you should place Shift+Enter before Enter. If you include the OS2.H header file, you can use the following constants to specify the accelerator options: ┌────────────────────┬────────────────────┬────────────────────┐ │AF_ALT │AF_CHAR │AF_CONTROL │ ├────────────────────┼────────────────────┼────────────────────┤ │AF_HELP │AF_LONEKEY │AF_SCANCODE │ ├────────────────────┼────────────────────┼────────────────────┤ │AF_SHIFT │AF_SYSCOMMAND │AF_VIRTUALKEY │ └────────────────────┴────────────────────┴────────────────────┘ To combine these constants, you must use the bitwise OR (|) operator. Example This example creates an accelerator table whose accelerator-table identifier is 1. The table contains two accelerators: Ctrl+S and Ctrl+G. These accelerators generate WM_COMMAND messages with values of 101 and 102, respectively, when the user presses the corresponding keys. ACCELTABLE 1 BEGIN "S", 101, CONTROL "G", 102, CONTROL END ═══ 18.5.2. ASSOCTABLE Statement ═══ Syntax: ASSOCTABLE assoctable-id [load-option][mem-option][code-page] BEGIN association-name, file-match-string[, extended-attribute-flag] [, icon-filename] . . . END Description The ASSOCTABLE statement defines a file-association table for an application. This table associates the data files that an application creates with the executable file of the application. When the user selects one of these data files from File Manager, the associated application begins executing. A file-association table can also associate icons with the data files that an application creates. The shell uses these icons to identify the data files graphically. Because a file-association table associates icons by file type, all data files having the same file type have the same icon. You can provide any number of ASSOCTABLE statements in a resource script file, but each statement must specify a unique assoctable-id value. The file-association tables are written not only to the resources within your executable file, but also to the .ASSOC extended attribute. However, only the last file-association table specified in the resource script file is actually written to the extended attribute. assoctable-id Specifies the association-table identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. load-option Specifies when the system loads the resource from the executable file into memory. This value must be one of the following: PRELOAD System loads the resource when the application starts. LOADONCALL System loads the resource when the application calls the DosGetResource or DosGetResource2 function. This is the default option. mem-option Specifies how the system manages the resource when it is in memory. This value must be one of the following: FIXED System keeps the resource at a fixed memory location. MOVEABLE System moves the resource as necessary to compact memory. This is the default option. DISCARDABLE System discards the resource if it is no longer needed. code-page Specifies a code page value. For a list of valid code pages see CODEPAGE Statement. association-name Specifies the name of the file type the application recognizes. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the name, you must include the double quotation mark twice. file-match-string Specifies the file-matching string of a particular type of data file that the application creates. This field must contain zero or more characters enclosed in double quotation marks. You can only use characters that are valid in OS/2 filenames and extensions and the OS/2 wildcard characters question mark (?) and asterisk (*). extended-attribute-flag Specifies the extended-attribute options. This value can be a combination of the following: EAF_DEFAULTOWNER Specifies that the application containing the file-association table starts when the user selects any file matching the file-match-string field from File Manager. EAF_REUSEICON Specifies that the icon defined in the previous entry of the file-association table is used as the icon for the current data-file type. EAF_UNCHANGEABLE Specifies that the entry should not be edited. icon-filename Specifies the name of the file containing an icon. File Manager uses this icon to represent all application-created data files matching the file-match-string field. The file must be in the current directory. ═══ 18.5.3. AUTOCHECKBOX Statement ═══ Syntax: AUTOCHECKBOX text, id, x, y, width, height[, style] The AUTOCHECKBOX statement creates an automatic-check-box control. The control is a small rectangle (check box) that contains an X when the user selects it. The specified text is displayed to the right of the check box. An X appears in the square when the user first selects the control and disappears the next time the user selects it. The AUTOCHECKBOX statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, dimensions, and attributes of a control window. The predefined class for this control is WC_BUTTON. If you do not specify the style, the default style is BS_AUTOCHECKBOX and WS_TABSTOP. text Specifies text that is displayed to the right of the control. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the text, you must include the double quotation mark twice. A tilde ( ~ ) character in the text indicates that the following character is used as a mnemonic character for the control. When the control is displayed, the tilde is not shown, but the mnemonic character is underlined. The user can choose the control by pressing the key corresponding to the underlined mnemonic character. id Specifies the control identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. y Specifies the y-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. width Specifies the width of the control. This value must be an integer in the range 0 through 65535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. This value must be an integer in the range 0 through 65535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. This value can be a combination of the styles specified for WC_BUTTON. You can use the bitwise OR (|) operator to combine styles. Example This example creates an automatic-check-box control that is labeled "Italic." AUTOCHECKBOX "Italic", 101, 10, 10, 100, 100 ═══ 18.5.4. AUTORADIOBUTTON Statement ═══ Syntax: AUTORADIOBUTTON text, id, x, y, width, height[, style] The AUTORADIOBUTTON statement creates an automatic-radio-button control. This control is a small circle with the given text displayed to its right. The control highlights the circle and sends a message to its parent window when the user selects the button. The control also removes the selection from any other automatic-radio-button controls in the same group. When the user selects the button again, the control removes the highlight before sending a message. The AUTORADIOBUTTON statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, dimensions, and attributes of a control window. The predefined class for this control is WC_BUTTON. If you do not specify a style, the default style is BS_AUTORADIOBUTTON. text Specifies text that is displayed to the right of the control. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the text, you must include the double quotation mark twice. A tilde ( ~ ) character in the text indicates that the following character is used as a mnemonic character for the control. When the control is displayed, the tilde is not shown, but the mnemonic character is underlined. The user can choose the control by pressing the key corresponding to the underlined mnemonic character. id Specifies the control identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. This value must be an integer in the range 32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. y This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. width Specifies the width of the control. This value must be an integer in the range 0 through 65535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. This value must be an integer in the range 0 through 65535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. This value can be a combination of the styles specified for WC_BUTTON. You can use the bitwise OR (|) operator to combine styles. Example This example creates an automatic-radio-button control that is labeled "Italic." AUTORADIOBUTTON "Italic", 101, 10, 10, 24, 50 ═══ 18.5.5. BITMAP Statement ═══ Syntax: BITMAP bitmap-id [load-option] [mem-option] [codepage] filename The BITMAP statement defines a bit map resource for an application. A bit map resource, typically created using the Icon Editor, is a custom bit map that an application uses in its display or as an item in a menu. The BITMAP statement copies the bit-map resource from the file specified in the filename field and adds it to the application's other resources. A bit-map resource can be loaded from the executable file when needed by using the GpiLoadBitmap function. You can provide any number of BITMAP statements in a resource script file, but each statement must specify a unique bitmap-id value. bitmap-id Specifies the bit-map-resource identifier. This value must be an integer in the range -32768 through 32767 or a simple expression that evaluates to a value in that range. load-option Specifies when the system loads the resource from the executable file into memory. This value must be one of the following: PRELOAD System loads the resource when the application starts. LOADONCALL System loads the resource when the application calls the GpiLoadBitmap function. This is the default option. mem-option Specifies how the system manages the resource when it is in memory. This value must be one of the following: FIXED System keeps the resource at a fixed memory location. MOVEABLE System moves the resource as necessary to compact memory. This is the default option. DISCARDABLE System discards the resource if it is no longer needed. codepage Specifies a code page value. For a list of valid code pages see CODEPAGE Statement. filename Specifies the name of the file containing the icon resource. If the file is not in the current directory, filename must be preceded by a full path. Example This example defines a bit map whose bit-map identifier is 12. The bit-map resource is copied from the file CUSTOM.BMP. BITMAP 12 custom.bmp ═══ 18.5.6. CHECKBOX Statement ═══ Syntax: CHECKBOX text, id, x, y, width, height[, style] The CHECKBOX statement creates a check-box control. The control is a small rectangle (check box) that has the specified text displayed to the right. The control highlights the rectangle and sends a message to its parent window when the user selects the control. The CHECKBOX statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, dimensions, and attributes of a control window. The predefined class for this control is WC_BUTTON. If you do not specify a style, the default style is BS_CHECKBOX and WS_TABSTOP. text Specifies text that is displayed to the right of the control. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the text, you must include the double quotation mark twice. A tilde ( ~ ) character in the text indicates that the following character is used as a mnemonic character for the control. When the control is displayed, the tilde is not shown, but the mnemonic character is underlined. The user can choose the control by pressing the key corresponding to the underlined mnemonic character. id Specifies the control identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. y Specifies the y-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. width Specifies the width of the control. This value must be an integer in the range 0 through 65535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. This value must be an integer in the range 0 through 65535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. This value can be a combination of the styles specified for WC_BUTTON. You can use the bitwise OR (|) operator to combine styles. Example This example creates a check-box control that is labeled "Italic." CHECKBOX "Italic", 101, 10, 10, 100, 100 ═══ 18.5.7. CODEPAGE Statement ═══ Syntax: CODEPAGE codepage-id The CODEPAGE statement sets the code page for all subsequent resources. The code page specifies the character set used for characters in the resource. If the CODEPAGE statement is not given in a resource script file, RC uses the code page set up for the individual system. If more than one CODEPAGE statement is given in the file, each CODEPAGE statement applies to the resource statements between it and the next CODEPAGE statement. codepage-id Identifies the code page to be used for subsequent resources. This value can be one of the following: 437 United States 850 Multilingual 860 Portuguese 863 Canadian French 865 Norwegian 932 Japanese 934 Korean 936 Chinese 938 Taiwan Comments You may also specify a code page by placing a code-page identifier in the load-options or memory-options field of any RC statement that uses those fields. Example In this example, the code page for the character-string resources is set to Portuguese (860). CODEPAGE 860 STRINGTABLE BEGIN 1 "Filename not found" 2 "Cannot open file for reading" END ═══ 18.5.8. COMBOBOX Statement ═══ Syntax: COMBOBOX text, id, x, y, width, height[, style] The COMBOBOX statement creates a combination-box control. This control combines a list-box control with an entry-field control. It allows the user to place the selected item from a list box into an entry field. The COMBOBOX statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, dimensions, and attributes of a control window. The predefined class for this control is WC_COMBOBOX. If you do not specify a style, the default style is CBS_SIMPLE, WS_GROUP, WS_TABSTOP, and WS_VISIBLE. text Specifies text that is displayed in the entry field of the control. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the text, you must include the double quotation mark twice. id Specifies the control identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. y Specifies the y-coordinate of the lower-left corner of the control This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. width Specifies the width of the control. This value must be an integer in the range 0 through 65535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. This value must be an integer in the range 0 through 65535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. This value can be a combination of the styles specified for WC_COMBOBOX. You can use the bitwise OR (|) operator to combine styles. Example This example creates a combination-box control. COMBOBOX "", 101, 10, 10, 24, 50 ═══ 18.5.9. CONTAINER Statement ═══ Syntax: CONTAINER id, x, y, width, height [,style] The CONTAINER statement creates a container control within a dialog window. The container control is a visual component that holds objects. The CONTAINER statement defines the identifier, position, dimensions, and attributes of a container control. The predefined class for this control is WC_CONTAINER. If you do not specify a style, the default style is WS_TABSTOP, WS_VISIBLE, and CCS_SINGLESEL. id Specifies the control identifier. This value is any integer -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. This value is any integer -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog window containing the container control. y Specifies the y-coordinate of the lower-left corner of the control. This value is any integer -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog window containing the container control. width Specifies the width of the control. This value is any integer 0 through 65535, or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. This value is any integer 0 through 65535, or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. This value can be a combination of the styles specified for WC_CONTAINER. Use the bitwise OR (|) operator to combine styles. Comments A CONTAINER statement is only used in a DIALOG or WINDOW statement. Example This example creates a container control at position (30,30) within the dialog window. The container has a width of 70 character units and a height of 25 character units. Its resource ID is 301. The default style CCS_SINGLESEL has been overridden by the style specification CCS_MULTIPLESEL. The default styles WS_TABSTOP and WS_GROUP are both in effect, though only the latter is specified. #define IDC_CONTAINER 301 #define IDD_CONTAINERDLG 504 DIALOG "Container", IDD_CONTAINERDLG, 23, 6, 120, 280, FS_NOBYTEALIGN | WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR BEGIN CONTAINER IDC_CONTAINER, 30, 30, 70, 200, CCS_MULTIPLESEL | WS_GROUP END ═══ 18.5.10. CONTROL Statement ═══ Syntax: CONTROL text, id, x, y, width, height, class[, style] [ data-definitions ] [ BEGIN control-definition . . . END ] The CONTROL statement defines a control as belonging to the specified class. The statement defines the position and dimensions of the control within the parent window, as well as the control style. The CONTROL statement is most often used in a DIALOG or WINDOW statement. Typically, several CONTROL statements are used in each DIALOG statement, and each CONTROL statement must have a unique id value. The optional BEGIN and END statements enclose any CONTROL statements that may be given with the control. CONTROL statements given in this manner represent child windows belonging to the control created by the CONTROL statement. text Specifies text that is displayed to the right of the control. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the text, you must include the double quotation mark twice. In the appropriate styles, a tilde ( ~ ) character in the text indicates that the following character is used as a mnemonic character for the control. When the control is displayed, the tilde is not shown, but the mnemonic character is underlined. The user can choose the control by pressing the key corresponding to the underlined mnemonic character. id Specifies the control identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the parent window. y Specifies the y-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the parent window. width Specifies the width of the control. This value must be an integer in the range 0 through 65535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The value is in n-character units. height Specifies the height of the control. This value must be an integer in the range 0 through 65535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The value is in 1/8-character units. class Specifies the control class. This value can be one of the control classes specified in the "Control Classes" table, in the Presentation Manager Programming Reference, or the name of the control class, enclosed in double quotation marks. style Specifies the control style. This value can be a combination of control styles. You can use the bitwise OR (|) operator to combine styles. data-definitions Specifies a CTLDATA and/or PRESPARAMS statement. These statements define control and presentation data for the control. For more information, see CTLDATA Statement and PRESPARAMS Statement. control-definition Specifies a CONTROL statement or any one of several predefined control statements. These statements define the style, position, and dimensions of controls in the control. Comments The CONTROL statement can actually contain any combination of CONTROL, DIALOG, and WINDOW statements. But typically, a CONTROL statement contains no such statements. Example This example creates a pushbutton control with the WS_TABSTOP and WS_VISIBLE styles. CONTROL "OK", 101, 10, 10, 20, 50, WC_BUTTON, BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE ═══ 18.5.11. CTEXT Statement ═══ Syntax: CTEXT text, id, x, y, width, height[, style] The CTEXT statement creates a centered-text control. The control is a simple rectangle displaying the given text centered in the rectangle. The text is formatted before it is displayed. Words that would extend past the end of a line are automatically wrapped to the beginning of the next line. The CTEXT statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, dimensions, and attributes of the control. The predefined class for this control is WC_STATIC. If you do not specify a style, the default style is SS_TEXT, DT_CENTER, and WS_GROUP. text Specifies text that is centered in the rectangular area of the control. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the text, you must include the double quotation mark twice. id Specifies the control identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. y Specifies the y-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. width Specifies the width of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. This value can be a combination of the styles specified for WC_STATIC. You can use the bitwise OR (|) operator to combine styles. Example This example creates a centered-text control that is labeled "Filename." CTEXT "Filename", 101, 10, 10, 100, 100 ═══ 18.5.12. CTLDATA Statement ═══ Syntax: CTLDATA word-value[, word-value][...] CTLDATA string CTLDATA MENU BEGIN menuitem-definition . . . END The CTLDATA statement defines control data for a custom dialog box, window, or control. The statement has three basic forms to permit specifying a menu or specifying data in words or characters. The data can be in any format, since only your window procedure will use it. The window procedure of the dialog box, window, or control receives this data when the item is created. It is up to the window procedure to process the data. word-value Specifies a 16-bit value. This value must be an integer in the range -32768 through 32767. It must be in decimal notation. string Specifies a string of 8-bit characters. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the string, you must include the double quotation mark twice. menuitem-definition Specifies a MENUITEM or SUBMENU statement. These statements define the individual commands or submenus in the given menu. For details about these statements, see MENUITEM Statement and SUBMENU Statement. Comments CTLDATA is often used to supply data that controls the subsequent operation of the custom window. For example, the CTLDATA statement may contain extended style bits - that is, style bits designed specifically for your customized window. You should reserve the CTLDATA statement for window classes that you create yourself. Example This example creates a menu for the window created with the WINDOW statement. WINDOWTEMPLATE 1 BEGIN WINDOW "Sample", 1, 0, 0, 100, 100, "MYCLASS", 0, FCF_STANDARD CTLDATA MENU BEGIN MENUITEM "Exit", 101 END END ═══ 18.5.13. DEFAULTICON STATEMENT ═══ This statement installs the named icon file definition under the ICON Extended Attribute of the program file. An icon with an icon-id of 1 is the default icon by default, unless you supply a different icon. Example DEFAULTICON filename.ico ═══ 18.5.14. define Directive ═══ Syntax: define name value The define directive assigns the given value to the specified name. All subsequent occurrences of the name are replaced by the value. name Specifies the name to be defined. This value is any combination of letters, digits, and punctuation. value Specifies any integer, character string, or line of text. This value can contain another defined name, which creates a level of nested defines. You are limited to 64 levels of nested defines. Example This example assigns values to the names "NONZERO" and "USERCLASS". #define NONZERO 1 #define USERCLASS "MyControlClass" ═══ 18.5.15. DEFPUSHBUTTON Statement ═══ Syntax: DEFPUSHBUTTON text, id, x, y, width, height[, style] The DEFPUSHBUTTON statement creates a default pushbutton control. The control is a round-cornered rectangle containing the given text. The rectangle has a bold outline to represent that it is the default response for the user. The control sends a message to its parent window when the user chooses the control. The DEFPUSHBUTTON statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, dimensions, and attributes of the control. The predefined class for this control is WC_BUTTON. If you do not specify a style, the default style is BS_PUSHBUTTON, BS_DEFAULT, and WS_TABSTOP. text Specifies text that is centered in the rectangular area of the control. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the text, you must include the double quotation mark twice. A tilde ( ~ ) character in the text indicates that the following character is used as a mnemonic character for the control. When the control is displayed, the tilde is not shown, but the mnemonic character is underlined. The user can choose the control by pressing the key corresponding to the underlined mnemonic character. id Specifies the control identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. y Specifies the y-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. width Specifies the width of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. This value can be a combination of the styles specified for WC_BUTTON. You can use the bitwise OR (|) operator to combine styles. Example This example creates a default pushbutton control that is labeled "Cancel." DEFPUSHBUTTON "Cancel", 101, 10, 10, 24, 50 ═══ 18.5.16. DIALOG Statement ═══ Syntax: DIALOG text, id, x, y, width, height[, style[, framectl]][data-definitions] BEGIN control-definition . . . END The DIALOG statement defines a window that an application can use to create dialog boxes. The statement defines the position and dimensions of the dialog box on the screen, as well as the dialog-box style. The DIALOG statement is most often used in a DLGTEMPLATE statement. Typically, you use only one DIALOG statement in each DLGTEMPLATE statement, and the DIALOG statement contains at least one control definition. text Specifies the dialog-box title if the style specifies a title bar. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the title, you must include the double quotation mark twice. id Specifies the dialog-box identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the dialog box. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The value is in dialog units, but its exact meaning depends on the dialog style. See the "Comments" section for details. y Specifies the y-coordinate of the lower-left corner of the dialog box. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The value is in dialog units, but its exact meaning depends on the dialog style. See the "Comments" section for details. width Specifies the width of the dialog box. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The value is in n-character units. height Specifies the height of the dialog box. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The value is in 1/8-character units. style Specifies the dialog-box style. This value can be any of the window, dialog-box, or frame styles. You can use the bitwise OR (|) operator to combine styles. framectl Specifies the styles for frame controls belonging to the dialog box. This value can be any of the frame-control styles specified in the "Frame-Control Flags" table in the Presentation Manager Programming Reference. You can use the bitwise OR (|) operator to combine styles. data-definitions Specifies a CTLDATA and/or PRESPARAMS statement. These statements define control and presentation data for the dialog box. For more information, see CTLDATA Statement and PRESPARAMS Statement. control-definition Specifies a CONTROL statement or any one of several predefined control statements. These statements define the style, position, and dimensions of controls in the dialog box. Comments The exact meaning of the coordinates depends on the style defined by the style field. For dialog boxes with FS_SCREENALIGN style, the coordinates are relative to the origin of the display screen. For dialog boxes with the style FS_MOUSEALIGN, the coordinates are relative to the position of the mouse pointer at the time the dialog box is created. For all other dialog boxes, the coordinates are relative to the origin of the parent window. The DIALOG statement can actually contain any combination of CONTROL, DIALOG, and WINDOW statements. Typically, a DIALOG statement contains one or more CONTROL statements. Example This example creates a dialog box that is labeled "Disk Error." DLGTEMPLATE 1 BEGIN DIALOG "Disk Error", 100, 10, 10, 300, 110 BEGIN CTEXT "Select One:", 1, 10, 80, 280, 12 RADIOBUTTON "Retry", 2, 75, 50, 60, 12 RADIOBUTTON "Abort", 3, 75, 30, 60, 12 RADIOBUTTON "Ignore", 4, 75, 10, 60, 12 END END ═══ 18.5.17. DLGINCLUDE Statement ═══ Syntax: DLGINCLUDE id filename The DLGINCLUDE statement adds the specified filename to the resource file. The DLGINCLUDE statement is typically used to let the application access the definitions file for the dialog box with the corresponding identifier. The file named by filename must contain the define directives used by the dialog box. You can provide any number of DLGINCLUDE statements in a resource script file, but each must have a unique identifier. id Specifies the dialog-box identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. filename Specifies the name of the file containing the define directives. If the file is not in the current directory, filename must be preceded by a full path. Example This example includes the name of the definition file dlgdef.h. The dialog-box identifier is 5. DLGINCLUDE 5 \\INCLUDE\\DLGREF.H ═══ 18.5.18. DLGTEMPLATE Statement ═══ Syntax: DLGTEMPLATE dialog-id [load-option] [mem-option][codepage] BEGIN dialog-definition . . . END The DLGTEMPLATE statement creates a dialog-box template. A dialog-box template consists of a series of statements that define the identifier, load and memory options, dialog-box dimensions, and controls in the dialog box. The dialog-box template can be loaded from the executable file by using the WinLoadDlg function. You can provide any number of dialog-box templates in a resource script file, but each template must have a unique dialog-id value. dialog-id Specifies the dialog-box identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. load-option Specifies when the system loads the resource from the executable file into memory. This value must be one of the following: PRELOAD System loads the resource when the application starts. LOADONCALL System loads the resource when the application calls the WinLoadDlg function. This is the default option. mem-option Specifies how the system manages the resource when it is in memory. This value must be one or more of the following: FIXED System keeps the resource at a fixed memory location. MOVEABLE System moves the resource as necessary to compact memory. DISCARDABLE System discards the resource if it is no longer needed. The default setting is MOVEABLE and DISCARDABLE. codepage Specifies a code-page value. For a list of valid code pages see CODEPAGE Statement. dialog-definition Specifies a DIALOG statement. The statement defines the dimensions and style of the given dialog box. For details about the statement, see DIALOG Statement. Comments A DLGTEMPLATE statement can actually contain DIALOG, CONTROL, and WINDOW statements. Typically, you include only one DIALOG statement. Example This example uses a DLGTEMPLATE statement to create a dialog box. DLGTEMPLATE ID_GETTIMER BEGIN DIALOG "Timer", 1, 10, 10, 100, 40 BEGIN LTEXT "Time (0 - 15):", 4, 8, 24, 72, 12 ENTRYFIELD "0", ID_TIME, 80, 28, 16, 8, ES_MARGIN DEFPUSHBUTTON "Enter", ID_TIMEOK, 10, 6, 36, 12 PUSHBUTTON "Cancel", ID_TIMECANCEL, 52, 6, 40, 12 END END ═══ 18.5.19. EDITTEXT Statement ═══ Syntax: EDITTEXT text, id, x, y, width, height [,style] The EDITTEXT statement creates an entry-field control. This control is a rectangle in which the user can type and edit text. The control displays a pointer when the user selects the control. The user can then use the keyboard to enter text or edit the existing text. Editing keys include the BACKSPACE and DELETE keys. By using the mouse or the DIRECTION keys, the user can select the character or characters to delete or select the place to insert new characters. The EDITTEXT statement defines the text, identifier, dimensions, and attributes of a control window. The predefined class for this control is WC_ENTRYFIELD. If you do not specify a style, the default style is ES_AUTOSCROLL and WS_TABSTOP. text Specifies text that is displayed in the rectangular area of the control. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the text, you must include the double quotation mark twice. id Specifies the control identifier. This value is any integer -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. This value is any integer -32768 through 32767, or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog window. y Specifies the y-coordinate of the lower-left corner of the control. This value is any integer -32768 through 32767, or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog window. width Specifies the width of the control. This value is any integer 0 through 65 535, or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. This value is any integer 0 through 65 535, or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. This value can be a combination of the styles specified for WC_ENTRYFIELD. You can use the bitwise OR ( | ) operator to combine styles. Comments The EDITTEXT control statement is identical to the ENTRYFIELD control statement. Use the EDITTEXT statement only in a DIALOG or WINDOW statement. Example This example creates an entry-field control that is not labeled. EDITTEXT "", 101, 10, 10, 24, 50 ═══ 18.5.20. elif Directive ═══ Syntax: elif constant-expression The elif directive marks an optional clause of a conditional-compilation block defined by a ifdef, ifndef, or if directive. The directive controls conditional compilation of the resource file by checking the specified constant expression. If the constant expression is nonzero, elif directs the compiler to continue processing statements up to the next endif, else, or elif directive and then skip to the statement after endif. If the constant expression is zero, elif directs the compiler to skip to the next endif, else, or elif directive. You can use any number of elif directives in a conditional block. constant-expression Specifies the expression to be checked. This value is a defined name, an integer constant, or an expression consisting of names, integers, and arithmetic and relational operators. Example In this example, elif directs the compiler to process the second BITMAP statement only if the value assigned to the name "Version" is less than 7. The elif directive itself is processed only if Version is greater than or equal to 3. #if Version < 3 BITMAP 1 errbox.bmp #elif Version < 7 BITMAP 1 userbox.bmp #endif ═══ 18.5.21. else Directive ═══ Syntax: else The else directive marks an optional clause of a conditional-compilation block defined by a ifdef, ifndef, or if directive. The else directive must be the last directive before the endif directive. This directive has no arguments. Example This example compiles the second BITMAP statement only if the name "DEBUG" is not defined. #ifdef DEBUG BITMAP 1 errbox.bmp #else BITMAP 1 userbox.bmp #endif ═══ 18.5.22. endif Directive ═══ Syntax: endif The endif directive marks the end of a conditional-compilation block defined by a ifdef directive. One endif is required for each if, ifdef, or ifndef directive. This directive has no arguments. ═══ 18.5.23. ENTRYFIELD Statement ═══ ENTRYFIELD text, id, x, y, width, height , [style] The ENTRYFIELD statement creates an entry-field control. This control is a rectangle in which the user can type and edit text. The control displays a pointer when the user selects the control. The user can then use the keyboard to enter text or edit the existing text. Editing keys include the BACKSPACE and DELETE keys. By using the mouse or the DIRECTION keys, the user can select the character or characters to delete or select the place to insert new characters. The ENTRYFIELD statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, dimensions, and attributes of a control window. The predefined class for this control is WC_ENTRYFIELD. If you do not specify a style, the default style is ES_AUTOSCROLL and WS_TABSTOP. text Specifies text that is displayed in the rectangular area of the control. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the text, you must include the double quotation mark twice. id Specifies the control identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. y Specifies the y-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. width Specifies the width of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. This value can be a combination of the styles specified for WC_ENTRYFIELD. You can use the bitwise OR (|) operator to combine styles. Example This example creates an entry-field control that is not labeled. ENTRYFIELD "", 101, 10, 10, 24, 50 ═══ 18.5.24. FONT Statement ═══ Syntax: FONT font-id [load-option][ mem-option] [codepage] filename The FONT statement defines a font resource for an application. A font resource, typically created by using the OS/2 Font Editor, is a bit map defining the shape of the individual characters in a character set. The FONT statement copies the font resource from the file specified in the filename field and adds it to the other resources of the application. A font resource can be loaded from the executable file when needed by using the GpiLoadFonts function. You can provide any number of FONT statements in a resource script file, but each statement must specify a unique font-id value. font-id Specifies the font-resource identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. load-option Specifies when the system loads the resource from the executable file into memory. This value must be one of the following: PRELOAD System loads the resource when the application starts. LOADONCALL System loads the resource when the application calls the GpiLoadFonts function. This is the default option. mem-option Specifies how the system manages the resource when it is i memory. This value must be one or more of the following: FIXED System keeps the resource at a fixed memory location. MOVEABLE System moves the resource as necessary to compact memory. DISCARDABLE System discards the resource if it is no longer needed. The default setting is MOVEABLE and DISCARDABLE. codepage Specifies a code page value. For a list of valid code pages see CODEPAGE Statement. filename Specifies the name of the file containing the font resource. If the file is not in the current directory, filename must be preceded by a full path. Example This example defines a font whose font identifier is 5. The font resource is copied from the file cmroman.fon. FONT 5 cmroman.fon ═══ 18.5.25. FRAME Statement ═══ Syntax: FRAME text, id, x, y, width, height[, style[, framectl]] data-definitions [ BEGIN window-definition . . . END ] The FRAME statement defines a frame window. The statement defines the title, identifier, position, and dimensions of the frame window, as well as the window style. The FRAME statement is most often used in a WINDOWTEMPLATE statement, and typically, only one FRAME statement is used. The FRAME statement, in turn, typically contains at least one WINDOW statement that defines the client window belonging to the frame window. The frame window has no default style. You must use the framectl field to define additional frame controls, such as a title bar and system menu, to be created when the frame window is created. If the text field is not empty, the statement automatically adds a title-bar control to the frame window, whether or not you specify the FCF_TITLEBAR style. Frame controls are given default styles and control identifiers depending on their class. For example, a title-bar control receives the identifier FID_TITLEBAR. text Specifies the title of the frame window. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the name, you must include the double quotation mark twice. id Specifies the window identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the window. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified window. y Specifies the y-coordinate of the lower-left corner of the window. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified window. width Specifies the width of the window. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the window. This value must be a integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the frame and window styles. This value can be a combination of frame styles. You can use the bitwise OR (|) operator to combine styles. framectl Specifies the styles of frame controls belonging to the frame window. This value can be a combination of the styles specified in the "Frame-Control Styles" table in the Presentation Manager Programmers Reference. You can use the bitwise OR (|) operator to combine styles. data-definitions Specifies a CTLDATA and/or PRESPARAMS statement. These statements define control and presentation data for the frame window. For more information, see CTLDATA Statement and PRESPARAMS Statement. window-definition Specifies a WINDOW statement or any one of several predefined control statements. These statements define the style, position, and dimensions of windows or controls in the frame window. Comments The FRAME statement can actually contain any combination of CONTROL, DIALOG, and WINDOW statements. Typically, a FRAME statement contains one WINDOW statement. Example This example creates a standard frame window, with a title bar, a system menu, minimize and maximize boxes, and a vertical scroll bar. The FRAME statement contains a WINDOW statement defining the client window belonging to the frame window. WINDOWTEMPLATE 1 BEGIN FRAME "My Window", 1, 10, 10, 320, 130, 0, FCF_STANDARD | FCF_VERTSCROLL BEGIN WINDOW "", FID_CLIENT, 0, 0, 0, 0, "MyClientClass" END END ═══ 18.5.26. GROUPBOX Statement ═══ Syntax: GROUPBOX text, id, x, y, width, height [, style] The GROUPBOX statement creates a group-box control. The control is a rectangle that groups other controls together. The controls are grouped by drawing a border around them and displaying the given text in the upper-left corner. The GROUPBOX statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, dimensions, and attributes of a control window. The predefined class for this control is WC_STATIC. If you do not specify a style, the default style is SS_GROUPBOX and WS_TABSTOP. text Specifies text that appears in the upper-left corner of the control. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the text, you must include the double quotation mark twice. id Specifies the control identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. y Specifies the y-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. width Specifies the width of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. This value can be a combination of the styles specified for WC_STATIC. You can use the bitwise OR (|) operator to combine styles. Example This example creates a group-box control that is labeled "Options." GROUPBOX "Options", 101, 10, 10, 100, 100 ═══ 18.5.27. HELPITEM Statement ═══ Syntax: HELPITEM application-window-id, help-subtable-id, extended-helppanel-id The HELPITEM statement defines the help items in a help table. The statement, permitted only in a HELPTABLE statement, specifies the resource identifier of an application window for which help is provided, and the resource identifiers of the help subtable and extended help panel associated with the application window. You can provide any number of HELPITEM statements in a HELPTABLE statement. You should provide one HELPITEM statement for each application window for which help is provided. application-window-id Specifies the resource identifier of an application window for which help is provided. help-subtable-id Specifies the resource identifier of the help subtable associated with the specified application window. extended-helppanel-id Specifies the resource identifier of the extended help panel associated with the specified application window. Example This example defines a help item that associates a help subtable called IDSUB_FILEMENU and an extended help panel called IDEXT_APPHLP with an application window called IDWIN_FILEMENU. HELPITEM IDWIN_FILEMENU, IDSUB_FILEMENU, IDEXT_APPHLP ═══ 18.5.28. HELPSUBITEM Statement ═══ Syntax: HELPSUBITEM child-window-id, helppanel-id [ , integer...] The HELPSUBITEM statement defines the help subitems in a help subtable. This statement, which is permitted only in a HELPSUBTABLE statement, specifies the identifier of a child window for which help is provided, the identifier of the help panel associated with the child window, and one or more optional, application-defined integers. You can provide any number of HELPSUBITEM statements in a HELPSUBTABLE statement. You should provide one HELPSUBITEM statement for each child window for which help is provided. child-window-id Specifies the resource identifier of the child window for which help is provided. helppanel-id Specifies the resource identifier of the help panel associated with the specified child window. integer Specifies optional, application-defined integers. If you use this field, you must include the SUBITEMSIZE statement in the help subtable to specify the size, in words, of each help subitem in the help subtable. For details about this statement, see SUBITEMSIZE Statement. Example This example defines a help subitem that associates a child window called IDCLD_FILEMENU with a help panel called IDHP_FILEMENU. HELPSUBITEM IDCLD_FILEMENU, IDHP_FILEMENU ═══ 18.5.29. HELPSUBTABLE Statement ═══ Syntax: HELPSUBTABLE helpsubtable-id SUBITEMSIZE size BEGIN helpsubitem-definition . . . END The HELPSUBTABLE statement defines the contents of a help-subtable resource. A help-subtable resource contains a help-subitem entry for each item that can be selected in an application window. Each of these items should be a child window of the application window specified in the help-table resource. The help subtable should contain a help subitem for each control, child window, and menu item in the application window. You can provide any number of HELPSUBTABLE statements in a resource script file, but each statement must specify a unique helpsubtable-id value. You can also provide any number of helpsubitem-definition statements in the help subtable. These specify the child window for which help is provided, the help panel containing the help text for the child window, and one or more application-defined integers. If you include optional integers in the helpsubitem-definition statements, you must also include a SUBITEMSIZE statement to specify the size, in words, of each help subitem. All help subitems in a help subtable must be the same size. The default size is two words per help subitem. helpsubtable-id Specifies the resource identifier of the help subtable. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. helpsubitem-definition Specifies a HELPSUBITEM statement. A HELPSUBITEM statement specifies a child window, the help panel associated with the child window, and one or more optional, application-defined integers. For details about this statement, see HELPSUBITEM Statement. Example This example creates a help-subtable resource whose help-subtable identifier is IDSUB_FILEMENU. Each HELPSUBITEM statement specifies a child window and a help panel. HELPSUBTABLE IDSUB_FILEMENU BEGIN HELPSUBITEM IDCLD_OPEN, IDPNL_OPEN HELPSUBITEM IDCLD_SAVE, IDPNL_SAVE END ═══ 18.5.30. HELPTABLE Statement ═══ Syntax: HELPTABLE helptable-id BEGIN helpitem-definition . . . END The HELPTABLE statement defines the contents of a help-table resource. A help-table resource contains a help-item entry for each application window, dialog box, and message box for which help is provided. You can provide any number of HELPTABLE statements in a resource script file, but each statement must specify a unique helptable-id value. You can also provide any number of helpitem-definition statements in the help table. These specify the application windows for which help is provided, the help subtables associated with each application window, and the extended help panels associated with each application window. helptable-id Specifies the resource identifier of the help table. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. helpitem-definition Specifies a HELPITEM statement. A HELPITEM statement specifies an application window and the associated help subtable and extended help panel. For details about this statement, see HELPITEM Statement. Example This example creates a help-table resource whose help-table identifier is 1. Each HELPITEM statement specifies an application window, a help subtable, and an extended help panel. HELPTABLE 1 BEGIN HELPITEM IDWIN_FILEMENU, IDSUB_FILEMENU, IDEXT_APPHLP HELPITEM IDWIN_EDITMENU, IDSUB_EDITMENU, IDEXT_APPHLP END ═══ 18.5.31. ICON Statement (Resource) ═══ Syntax: ICON icon-id [load-option] [ mem-option] [codepage] filename This form of the ICON statement defines an icon resource for an application. An icon resource, typically created by using Icon Editor, is a bit map defining the shape of the icon to be used for a given application. The ICON statement copies the icon resource from the file specified in the filename field and adds it to the application's other resources. An icon resource can be loaded when creating a window by using the WinCreateStdWindow function with the FS_ICON style. You can provide any number of ICON statements in a resource script file, but each statement must specify a unique icon-id value. icon-id Specifies the icon-resource identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. A icon-id of 1 has a special meaning; for details, see the "Comment" section. load-option Specifies when the system loads the resource from the executable file into memory. This value must be one of the following: PRELOAD System loads the resource when the application starts. LOADONCALL System loads the resource when the application calls the WinCreateStdWindow function. This is the default option. mem-option Specifies how the system manages the resource when it is in memory. This value must be one or more of the following: FIXED System keeps the resource at a fixed memory location. MOVEABLE System moves the resource as necessary to compact memory. DISCARDABLE System discards the resource if it is no longer needed. The default setting is MOVEABLE and DISCARDABLE. codepage Specifies a code page value. For a list of valid code pages see CODEPAGE Statement. filename Specifies the name of the file containing the icon resource. If the file is not in the current directory, filename must be preceded by a full path. Comments An icon with an icon-id of 1 is the default icon. The RC program writes the icon not only to the resources in your executable file, but also as the .ICON extended attribute. File Manager will display this icon next to the name of the executable file. Example This example defines an icon whose icon identifier is 11. The icon resource is copied from the file custom.ico. ICON 11 custom.ico ═══ 18.5.32. ICON Statement (Control) ═══ Syntax: ICON icon-id, id, x, y, width, height , [style] This form of the ICON statement creates an icon control. This control is an icon displayed in a dialog box. The ICON statement, which you can use only in a DIALOG or WINDOW statement, defines the icon-resource identifier, icon-control identifier, position, and attributes of a control window. The predefined class for this control is WC_STATIC. If you do not specify a style, the default style is SS_ICON. For the ICON statement, the width and height fields are ignored; the icon automatically sizes itself. icon-id Specifies the resource identifier of an icon that is defined elsewhere in the resource file. id Specifies the control identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. y Specifies the y-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. width Specifies a reserved value. Can be set to zero. height Specifies a reserved value. Can be set to zero. style Specifies the control styles. This value can be a combination of the styles specified for WC_STATIC. You can use the bitwise OR (|) operator to combine styles. Example This example creates an icon control whose icon identifier is 99. ICON 99, 101, 10, 10, 0, 0 ═══ 18.5.33. if Directive ═══ Syntax: if constant-expression The if directive controls conditional compilation of the resource file by checking the specified constant expression. If the constant expression is nonzero, if directs the compiler to continue processing statements up to the next endif, else, or elif directive and then skip to the statement after the endif directive. If the constant expression is zero, if directs the compiler to skip to the next endif, else, or elif directive. constant-expression Specifies the expression to be checked. This value is a defined name, an integer constant, or an expression consisting of names, integers, and arithmetic and relational operators. Example This example compiles the BITMAP statement only if the value assigned to the name "Version" is less than 3. #if Version < 3 BITMAP 1 errbox.bmp #endif ═══ 18.5.34. ifdef Directive ═══ Syntax: ifdef name The ifdef directive controls conditional compilation of the resource file by checking the specified name. If the name has been defined by using a define directive or by using the -d command-line option of rc, ifdef directs the compiler to continue with the statement immediately after the ifdef directive. If the name has not been defined, ifdef directs the compiler to skip all statements up to the next endif directive. name Specifies the name to be checked by the directive. Example This example compiles the BITMAP statement only if the name "Debug" is defined. #ifdef Debug BITMAP 1 errbox.bmp #endif ═══ 18.5.35. ifndef Directive ═══ Syntax: ifndef name The ifndef directive controls conditional compilation of the resource file by checking the specified name. If the name has not been defined or if its definition has been removed by using the undef directive, ifndef directs the compiler to continue processing statements up to the next endif, else, or elif directive and then skip to the statement after the endif directive. If the name is defined, ifndef directs the compiler to skip to the next endif, else, or elif directive. name Specifies the name to be checked by the directive. Example This example compiles the BITMAP statement only if the name "Optimize" is not defined. #ifndef Optimize BITMAP 1 errbox.bmp #endif ═══ 18.5.36. include Directive ═══ Syntax: include filename The include directive causes RC to process the file specified in the filename field. This file should be a header file that defines the constants used in the resource script file. Only the define directives in the specified file are processed; all other statements are ignored. filename Specifies the OS/2 name of the file to be included. This value must be an ASCII string enclosed either in double quotation marks (if the file is in the current directory) or in less-than and greater-than characters (<>) (if the file is in the directory specified by -i command-line options or by the INCLUDE environment variable). You must give a full path enclosed in double quotation marks if the file is not in the current directory or in the directory specified by -i command-line options or by the INCLUDE environment variable. Comments The filename field is handled as a C string. Therefore, you must include two backslashes wherever one is required in the path. (As an alternative, you can use a single forward slash (/) instead of two backslashes.) Example This example processes the header files OS2.H and HEADERS\MYDEFS.H\I while compiling the resource script file. #include #include "headers\\\\mydefs.h" ═══ 18.5.37. LISTBOX Statement ═══ Syntax: LISTBOX id, x, y, width, height[, style] The LISTBOX statement creates commonly used controls for a dialog box or window. The control is a rectangle containing a list of user-selectable strings, such as filenames. The LISTBOX statement, which you can use only in a DIALOG or WINDOW statement, defines the identifier, dimensions, and attributes of a control window. The predefined class for this control is WC_LISTBOX. If you do not specify a style, the default style is WS_TABSTOP. id Specifies the control identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. y Specifies the y-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. width Specifies the width of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. This value can be a combination of the styles specified for WC_LISTBOX. You can use the bitwise OR (|) operator to combine styles. Example This example creates a list-box control whose identifier is 101. LISTBOX 101, 10, 10, 100, 100 ═══ 18.5.38. LTEXT Statement ═══ Syntax: LTEXT text, id, x, y, width, height[ , style] The LTEXT statement creates a left-aligned text control. The control is a simple rectangle displaying the given text left-aligned in the rectangle. The text is formatted before it is displayed. Words that would extend past the end of a line are automatically wrapped to the beginning of the next line. The LTEXT statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, dimensions, and attributes of the control. The predefined class for this control is WC_STATIC. If you do not specify a style, the default style is SS_TEXT, DT_LEFT, and WS_GROUP. text Specifies text that is left-aligned in the rectangular area of the control. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the text, you must include the double quotation mark twice. id Specifies the control identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. y Specifies the y-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. width Specifies the width of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. This value can be a combination of the styles specified for WC_STATIC. You can use the bitwise OR (|) operator to combine styles. Example This example creates a left-aligned text control that is labeled "Filename." LTEXT "Filename", 101, 10, 10, 100, 100 ═══ 18.5.39. MENU Statement ═══ Syntax: MENU menu-id [load-option][ mem-option][codepage] BEGIN menuitem-definition . . . END The MENU statement defines the contents of a menu resource. A menu resource is a collection of information that defines the appearance and function of an application menu. A menu is a special input tool that lets a user choose commands from a list of command names. A menu resource can be loaded from the executable file when needed by using the WinLoadMenu function. You can provide any number of MENU statements in a resource script file, but each statement must specify a unique menu-id value. You can provide any number of menuitem-definition statements in the menu. These define the submenus and menu items (commands) in the menu. The order of the statements defines the order of the menu items. menu-id Specifies the menu-resource identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. load-option Specifies when the system loads the resource from the executable file into memory. This value must be one of the following: PRELOAD System loads the resource when the application starts. LOADONCALL System loads the resource when the application calls the WinLoadMenu function. This is the default option. mem-option Specifies how the system manages the resource when it is in memory. This value must be one or more of the following: FIXED System keeps the resource at a fixed memory location. MOVEABLE System moves the resource as necessary to compact memory. DISCARDABLE System discards the resource if it is no longer needed. The default setting is MOVEABLE and DISCARDABLE. codepage Specifies a codepage value. For a list of valid code pages see CODEPAGE Statement. menuitem-definition Specifies a PRESPARAMS, MENUITEM, or SUBMENU statement. You can use one or more PRESPARAMS statements to control the appearance of a menu, such as the font and the foreground and background colors. If used, PRESPARAMS statements must be the first statements following the BEGIN keyword. For details about the PRESPARAMS statement, see PRESPARAMS Statement. MENUITEM and SUBMENU statements define the individual commands or submenus in the given menu. For details about these statements, see MENUITEM Statement and SUBMENU Statement. Example This example creates a menu resource whose menu identifier is 1. The menu contains a menu item named Alpha and a submenu named Beta. The submenu contains two menu items, Item 1 and Item 2. MENU 1 BEGIN MENUITEM "Alpha", 100 SUBMENU "Beta", 101 BEGIN MENUITEM "Item 1", 200 MENUITEM "Item 2", 201, , MIA_CHECKED END END ═══ 18.5.40. MENUITEM Statement ═══ Syntax: MENUITEM text, menu-id[, menuitem-style][,menuitem-attribute] MENUITEM SEPARATOR The MENUITEM statement creates a menu item for a menu. The statement, permitted only in a MENU or SUBMENU statement, defines the text, identifier, and attributes of a menu item. The system displays the text when it displays the corresponding menu. If the user chooses the menu item, the system generates a WM_COMMAND message that includes the specified menu-item identifier and sends it to the window owning the menu. You can provide any number of MENUITEM statements, but each must have a unique menu-id value. The alternative form of the MENUITEM statement, MENUITEM SEPARATOR, creates a menu separator. A menu separator is a horizontal dividing bar between two menu items in a submenu. The separator is not active - that is, the user cannot choose it, it has no text associated with it, and it has no identifier. text Specifies the text of the menu item. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the string, you must include the double quotation mark twice. The tilde character ( ~ ) and the \t and \a character combinations have special meanings in the string; for details, see the "Comments" section. If the menuitem-style field is MIS_BITMAP, item-name must be a bit-map identifier instead of a name. The bit-map identifier must have been previously defined using a BITMAP statement, must be preceded by the \b character, and must be enclosed in double quotation marks. menu-id Specifies the menu-item identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. Each identifier must be unique. menuitem-style Specifies the menu-item style. This value can be a combination of the following: MIS_BITMAP Specifies that item-name is a bit map identifier. MIS_BREAK Specifies that the menu has multiple columns of items in one pull-down menu or multiple lines of menus in the top-level menu. MIS_BREAKSEPARATOR Specifies that the menu has a vertical line between the columns in a pull-down menu. MIS_BUTTONSEPARATOR Specifies that the user can activate the menu item only by using the mouse. The text is centered in the item, rather than left justified. This option is used for the Help item on the right side of the menu bar. MIS_HELP Specifies that the menu item generates a WM_HELP message. MIS_OWNERDRAW Specifies that the menu item is drawn by the owner window. MIS_SEPARATOR Specifies that the menu item is a menu separator. Although the item-name and menu-id fields are ignored, you must still give values if you specify this style. MIS_STATIC Specifies that the user cannot choose the menu item. MIS_SUBMENU Specifies that the MENUITEM statement is to be treated as a SUBMENU statement. When you specify this option, you must follow the MENUITEM statement with a BEGIN and END clause, as in a SUBMENU statement. You may include a PRESPARAMS statement immediately after the BEGIN keyword. MIS_SYSCOMMAND Specifies that the menu item generates a WM_SYSCOMMAND message. MIS_TEXT Specifies that item-name is a character string. This is the default option. menuitem-attribute Specifies the menu-item attributes. This value can be a combination of the following: MIA_CHECKED Places a check mark next to the menu-item name. MIA_DISABLED Disables the menu item, preventing the system from generating a message when the user chooses the command. MIA_FRAMED Places a frame (heavy border) around the menu item. MIA_HILITED Places a highlight on the menu-item name when it is displayed, by inverting the name and background. MIA_NODISMISS Causes a submenu or menu item to remain displayed after the user chooses an item. Comments You can use the \t or \a character combination in any item name. The \t character inserts a tab when the name is displayed and is typically used to separate the menu-item name from the name of an accelerator key. The \a character aligns to the right all text that follows it. These characters are intended to be used for menu items in submenus only. The width of the displayed submenu is always adjusted so that there is at least one space (and usually more) between any pieces of text separated by a \t or a \a. (When compiling the menu resource, the compiler stores the \t and \a characters as control characters. For example, the \t is stored as 0x09.) A tilde ( ~ ) character in the item name indicates that the following character is used as a mnemonic character for the item. When the menu is displayed, the tilde is not shown, but the mnemonic character is underlined. The user can choose the menu item by pressing the key corresponding to the underlined mnemonic character. Example This example creates a menu item named Alpha. The item identifier is 101. MENUITEM "Alpha", 101 This example creates a menu item named Beta. The item identifier is 102. The menu item has a text style and a checked attribute. MENUITEM "Beta", 102, MIS_TEXT, MIA_CHECKED This example creates a menu separator between menu items named Gamma and Delta. MENUITEM "Gamma", 103 MENUITEM SEPARATOR MENUITEM "Delta", 104 This example creates a menu item that has a bit map instead of a name. The bit-map identifier, 1, is first defined using a BITMAP statement. The identifier for the menu item is 301. Note that a sign must be placed in front of the bit map identifier in the MENUITEM statement. BITMAP 1 mybitmap.bmp MENUITEM "#1", 301, MIS_BITMAP ═══ 18.5.41. MESSAGETABLE Statement ═══ Syntax: MESSAGETABLE [load-option] [ mem-option][codepage] BEGIN string-id string-definition . . . END The MESSAGETABLE statement creates one or more string resources for an application. A string resource is a null-terminated character string that has a unique string identifier. A string resource can be loaded from the executable file when needed by using the DosGetResource function with the RT_MESSAGE resource type. RT_MESSAGE resources are bundled together in groups of 16, with any missing IDs replaced with zero length strings. Each group, or bundle, is assigned a unique sequential ID. The resource string ID is not necessarily the same as the ID specified when using DosGetResource. The formula for calculating the ID of the resource bundle, for use in DosGetResource, is as follows: bundle ID = ( id / 16) +1, where id is the string ID assigned in the RC file. Thus, bundle 1 contains strings 0 to 15, bundle 2 contains strings 16 to 31, and so on. Once the address of the bundle has been returned by DosGetResource (using the calculated ID), the buffer can be parsed to locate the particular string within the bundle. The number of the string is calculated by the formula: string = id % 16 (string = remainder for id/16). The buffer returned consists of the CodePage of the strings in the first USHORT, followed by the 16 strings in the bundle. The first BYTE of each string is the length of the string (including the null terminator), followed by the string and the terminator. A zero length string is represented by two bytes: 01 (string length) followed by the null terminator. You can provide any number of MESSAGETABLE statements in a resource script file. The compiler treats all the strings from the various MESSAGETABLE statements as if they belonged to a single statement. This means that no two strings in a resource script file can have the same string identifier. Although the MESSAGETABLE and STRINGTABLE statements are nearly identical, most applications use the STRINGTABLE statement instead of the MESSAGETABLE statement to create string resources. load-option Specifies when the system loads the resource from the executable file into memory. This value must be one of the following: PRELOAD System loads the resource when the application starts. LOADONCALL System loads the resource when the application calls the DosGetResource or DosGetResource2 function. This is the default option. mem-option Specifies how the system manages the resource when it is in memory. This value must be one or more of the following: FIXED System keeps the resource at a fixed memory location. MOVEABLE System moves the resource as necessary to compact memory. DISCARDABLE System discards the resource if it is no longer needed. The default setting is MOVEABLE and DISCARDABLE. codepage Specifies a code page value. See CODEPAGE Statement for a list of valid code pages. string-id Specifies the character-string identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. The value can be specified in decimal or hexadecimal notation. Each string identifier in a resource script file must be unique. string-definition Specifies a character string. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the string, you must provide the double quotation mark twice. Comments You can continue a string on multiple lines by terminating the line with a backslash (\) or by terminating the line with a double quotation mark (") and then starting the next line with a double quotation mark. Example This example creates two string resources whose string identifiers are 1 and 2. MESSAGETABLE BEGIN 1 "Filename not found" 2 "Cannot open file for reading" END ═══ 18.5.42. MLE Statement ═══ Syntax: MLE text, id, x, y, width, height[, style] The MLE statement creates a multiple-line entry-field control. The control is a rectangle in which the user can type and edit multiple lines of text. The control displays a pointer when the user selects it. The user can then use the keyboard to enter text or edit the existing text. Editing keys include the BACKSPACE and DELETE keys. By using the mouse or the DIRECTION keys, the user can select the character or characters to delete or select the place to insert new characters. The MLE statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, dimensions, and attributes of a control window. The predefined class for this control is WC_MLE. If you do not specify a style, the default style is MLS_BORDER, WS_GROUP, and WS_TABSTOP. text Specifies text that is displayed in the rectangular area of the control. If the MLS_READONLY style is not specified, the user can edit the text. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the text, you must include the double quotation mark twice. id Specifies the control identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. y Specifies the y-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. width Specifies the width of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. This value can be a combination of the styles specified for WC_MLE. You can use the bitwise OR (|) operator to combine styles. Example This example creates a multiple-line entry-field control that is not labeled. MLE "", 101, 10, 10, 50, 100 ═══ 18.5.43. NOTEBOOK Statement ═══ Syntax: NOTEBOOK id, x, y, width, height[, style] The NOTEBOOK statement creates a notebook control within the dialog window. This control is used to organize information on individual pages so that it can be located and displayed easily. The NOTEBOOK statement defines the identifier, position, dimensions, and attributes of a notebook control. The predefined class for this control is WC_NOTEBOOK. If you do not specify a style, the default style is WS_TABSTOP and WS_VISIBLE. id Specifies the control identifier. The value is any integer -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. The value is any integer -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog window. y Specifies the y-coordinate of the lower-left corner of the control. The value is any integer -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog window. width Specifies the width of the control. The value is any integer 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. The value is any integer 0 through 65535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. This value can be a combination of the styles specified for WC_NOTEBOOK. You can use the bitwise OR ( | ) operator to combine styles. Comments The NOTEBOOK statement is used only in a DIALOG or WINDOW statement. Example This example creates a notebook control at position (20, 20) within the dialog window. The notebook has a width of 200 character units and a height of 50 character units. Its resource ID is 201. The tabs style BKS_ROUNDEDTABS specification overrides the notebook default style of square tabs. The default styles WS_TABSTOP and WS_GROUP are both in effect, though only the latter is specified. #define IDC_NOTEBOOK 201 #define IDD_NOTEBOOKDLG 503 DIALOG "Notebook", IDD_NOTEBOOKDLG, 11, 11, 420, 420, FS_NOBYTEALIGN | WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR BEGIN NOTEBOOK IDC_NOTEBOOK, 20, 20, 200, 400, BKS_ROUNDEDTABS | WS_GROUP END ═══ 18.5.44. POINTER Statement ═══ Syntax: POINTER pointer-id [load-option] [ mem-option] [codepage] filename The POINTER statement defines a pointer resource for an application. A pointer resource, typically created by using the OS/2 Icon Editor, is a bit map defining the shape of the mouse pointer on the screen. The POINTER statement copies the pointer resource from the file specified in the filename field and adds it to the application's other resources. A pointer resource can be loaded from the executable file when needed by using the WinLoadPointer function. You can provide any number of POINTER statements in a resource script file, but each statement must specify a unique pointer-id value. pointer-id Specifies the pointer-resource identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. load-option Specifies when the system loads the resource from the executable file into memory. This value must be one of the following: PRELOAD System loads the resource when the application starts. LOADONCALL System loads the resource when the application calls the WinLoadPointer function. This is the default option. mem-option Specifies how the system manages the resource when it is in memory. This value must be one or more of the following: FIXED System keeps the resource at a fixed memory location. MOVEABLE System moves the resource as necessary to compact memory. DISCARDABLE System discards the resource if it is no longer needed. The default setting is MOVEABLE and DISCARDABLE. codepage Specifies a code page value. See CODEPAGE Statement for a list of valid code pages. filename Specifies the name of the file containing the pointer resource. If the file is not in the current directory, filename must be preceded by a full path. Example This example defines a pointer whose pointer identifier is 10. The pointer resource is copied from the file custom.cur. POINTER 10 custom.cur ═══ 18.5.45. PRESPARAMS Statement ═══ Syntax: PRESPARAMS presparam, value, presparam, value, ... The PRESPARAMS statement defines presentation fields that customize a dialog box, menu, window, or control. PRESPARAMS data is a series of types and values. The window procedure of the dialog box, menu, window or control receives and processes this data when the item is created. The data for custom controls can be in any format. presparam Specifies a presentation-field type. value Specifies the presentation-field value. Comments PRESPARAMS is often used to supply data to control the appearance of the customized window when it is first created. For example, the PRESPARAMS statement may specify the colors to be used in the window. Example This example creates a menu resource with a menu identifier of 1. The PRESPARAMS statement specifies that the following three menu items be displayed in the 12-point Helvetica font. MENU 1 BEGIN PRESPARAMS PP_FONTNAMESIZE, "12.Helv" MENUITEM "New", 100 MENUITEM "Open", 101 MENUITEM "Save", 102 END ═══ 18.5.46. PUSHBUTTON Statement ═══ Syntax: PUSHBUTTON text, id, x, y, width, height[, style] The PUSHBUTTON statement creates a pushbutton control. The control is a round-cornered rectangle containing the given text. The control sends a message to its parent whenever the user chooses the control. The PUSHBUTTON statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, dimensions, and attributes of a control window. The predefined class for this control is WC_BUTTON. If you do not specify a style, the default style is BS_PUSHBUTTON and WS_TABSTOP. text Specifies text that is centered in the rectangular area of the control. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the text, you must include the double quotation mark twice. A tilde ( ~ ) character in the text indicates that the following character is used as a mnemonic character for the control. When the control is displayed, the tilde is not shown, but the mnemonic character is underlined. The user can choose the control by pressing the key corresponding to the underlined mnemonic character. id Specifies the control identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. y Specifies the y-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. width Specifies the width of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. This value can be a combination of the styles specified for WC_BUTTON. You can use the bitwise OR (|) operator to combine styles. Example This example creates a pushbutton control that is labeled "OK." PUSHBUTTON "OK", 101, 10, 10, 100, 100 ═══ 18.5.47. RADIOBUTTON Statement ═══ Syntax: RADIOBUTTON text, id, x, y, width, height[, style] The RADIOBUTTON statement creates a radio-button control. The control is a small circle that has the given text displayed to its right. The control highlights the circle and sends a message to its parent window when the user selects the button. The control removes the highlight and sends a message when the button is next selected. The RADIOBUTTON statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, dimensions, and attributes of a control window. The predefined class for this control is WC_BUTTON. If you do not specify a style, the default style is BS_RADIOBUTTON. text Specifies text that is displayed to the right of the control. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the text, you must include the double quotation mark twice. A tilde ( ~ ) character in the text indicates that the following character is used as a mnemonic character for the control. When the control is displayed, the tilde is not shown, but the mnemonic character is underlined. The user can choose the control by pressing the key corresponding to the underlined mnemonic character. id Specifies the control identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. y Specifies the y-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. width Specifies the width of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. This value can be a combination of the styles specified for WC_BUTTON. You can use the bitwise OR (|) operator to combine styles. Example This example creates a radio-button control that is labeled "Italic." RADIOBUTTON "Italic", 101, 10, 10, 24, 50 ═══ 18.5.48. RCDATA Statement ═══ Syntax: RCDATA resource-id BEGIN data-definition , data-definition ... . . . END The RCDATA statement defines a custom-data resource for an application. The custom data can be in whatever format the application requires. You can provide any number of RCDATA statements in a resource script file, but each statement must specify a unique resource-id value. A custom-data resource can be loaded from the executable file when needed by using the DosGetResource or DosGetResource2 functions with the RT_RCDATA resource type. resource-id Specifies the custom-data identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. data-definition Specifies the custom data. The data may be simple expressions or strings. Example This example defines custom data that has a resource identifier of 5. RCDATA 5 BEGIN "E. A. Poe", 1849, -32, 3L, 0x8000000l, 3+4+5 END ═══ 18.5.49. RCINCLUDE Statement ═══ Syntax: RCINCLUDE filename The RCINCLUDE statement causes RC to process the resource script file specified in the filename field along with the current resource script file. The contents of both files are compiled by RC and the results are placed in one binary resource file and/or executable file. filename Specifies the name of the resource script file to be included. If the file is not in the current directory, filename must be preceded by a full path. Comments RCINCLUDE statements are processed before any other processing is done, including preprocessing by RCPP.EXE, which removes comments, replaces values in the define directives, and so on. When specifying a high performance file system (HPFS) file name on an RCINCLUDE statement, enclose the path and file name in double quotes; for example: RCINCLUDE "d:\project\long dialog.dlg" Double quotes enables the Resource Compiler to recognize a name containing embedded blank characters. Example This example includes the file DIALOGS.RC as part of the current resource script file. RCINCLUDE dialogs.rc ═══ 18.5.50. RESOURCE Statement ═══ Syntax: RESOURCE type-id resource-id [load-option] [mem-option][code page] filename The RESOURCE statement defines a custom resource for an application. A custom resource can be any data in any format. The RESOURCE statement copies the custom resource from the specified file and adds it to the application's other resources. A custom resource can be loaded from the executable file when needed by using the DosGetResource or DosGetResource2 function and specifying the resource's type and resource identifier. You can provide any number of RESOURCE statements in a resource script file, but each statement must specify a unique combination of type-id and resource-id values. That is, RESOURCE statements having the same type-id value are permitted as long as the resource-id value for each is unique. type-id Specifies the custom-resource type. This value must be an integer in the range 256 through 65 535, or a simple expression that evaluates to a value in that range. (Values 0 through 255 are reserved.) resource-id Specifies the custom-resource identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. load-option Specifies when the system loads the resource from the executable file into memory. This value must be one of the following: PRELOAD System loads the resource when the application starts. LOADONCALL System loads the resource when the application calls the DosGetResource or DosGetResource2 function. This is the default option. mem-option Specifies how the system manages the resource when it is in memory. This value must be one or more of the following: FIXED System keeps the resource at a fixed memory location. MOVEABLE System moves the resource as necessary to compact memory. DISCARDABLE System discards the resource if it is no longer needed. The default setting is MOVEABLE and DISCARDABLE. codepage Specifies a code page value. See CODEPAGE Statement. for a list of valid code pages. filename Specifies the name of the file containing the custom resource. If the file is not in the current directory, filename must be preceded by a full path. Example This example defines a custom resource whose type identifier is 300 and whose resource identifier is 14. The custom resource is copied from the file CUSTOM.RES. RESOURCE 300 14 custom.res ═══ 18.5.51. RTEXT Statement ═══ Syntax: RTEXT text, id, x, y, width, height[, style] The RTEXT statement creates a right-aligned text control. The control is a simple rectangle displaying the given text right-aligned in the rectangle. The text is formatted before it is displayed. Words that would extend past the end of a line are automatically wrapped to the beginning of the next line. The RTEXT statement, which you can use only in a DIALOG or WINDOW statement, defines the text, identifier, dimensions, and attributes of the control. The predefined class for the control is WC_STATIC. If you do not specify a style, the default style is SS_TEXT, DT_RIGHT, and WS_GROUP. text Specifies text that is right-aligned in the rectangular area of the control. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the text, you must include the double quotation mark twice. id Specifies the control identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. y Specifies the y-coordinate of the lower-left corner of the control. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control. width Specifies the width of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. This value can be a combination of the styles specified for WC_STATIC. You can use the bitwise OR (|) operator to combine styles. Example This example creates a right-aligned text control that is labeled "Filename." RTEXT "Filename", 101, 10, 10, 100, 100 ═══ 18.5.52. SLIDER Statement ═══ Syntax: SLIDER id, x, y, width, height[, style] The SLIDER statement creates a slider control within the dialog window. This control lets the user set, display, or modify a value by moving a slider arm along a slider shaft. The SLIDER statement defines the identifier, position, dimensions, and attributes of a slider control. The predefined class for this control is WC_SLIDER. If you do not specify a style, the default style is WS_TABSTOP and WS_VISIBLE. id Specifies the control identifier. The value is any integer -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. The value is any integer -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog window. y Specifies the y-coordinate of the lower-left corner of the control. The value is any integer -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog window. width Specifies the width of the control. The value is any integer 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. The value is any integer 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. The value can be any combination of the styles specified for WC_SLIDER. You can use the bitwise OR ( | ) operator to combine styles. Comments The SLIDER statement is only used in a DIALOG or WINDOW statement. Example This example creates a slider control at position (40, 30) within the dialog window. The slider has a width of 120 character units and a height of 2 character units. Its resource ID is 101. The style specification SLS_BUTTONSLEFT adds buttons to the left of the slider shaft. The default styles WS_TABSTOP and WS_VISIBLE are both in effect, though only the latter is specified. #define IDC_SLIDER 101 #define IDD_SLIDERDLG 502 DIALOG "Slider", IDD_SLIDERDLG, 11, 11, 200, 240, FS_NOBYTEALIGN | WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR BEGIN SLIDER IDC_SLIDER, 40, 30, 120, 16, SLS_BUTTONSLEFT | WS_VISIBLE END ═══ 18.5.53. SPINBUTTON Statement ═══ Syntax: SPINBUTTON id, x, y, width, height[, style] The SPINBUTTON statement creates a spinbutton control within the dialog window. This control gives the user quick access to a finite set of data. The SPINBUTTON statement defines the identifier, position, dimensions, and attributes of a spinbutton control. The predefined class for this control is WC_SPINBUTTON. If you do not specify a style, the default style is WS_TABSTOP, WS_VISIBLE, and SPBS_MASTER. id Specifies the control identifier. The value is any integer -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. The value is any integer -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog window. y Specifies the y-coordinate of the lower-left corner of the control. The value is any integer -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog window. width Specifies the width of the control. The value is any integer 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. The value is any integer 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. The value is any combination of the styles specified for WC_SPINBUTTON. You can use the bitwise OR ( | ) operator to combine styles. Comments The SPINBUTTON statement is used only in a DIALOG or WINDOW statement. Example This example creates a spinbutton control at position (80, 20) within the dialog window. The spinbutton has a width of 60 character units and a height of 3 character units. Its resource ID is 302. The style specification SPBS_NUMERICONLY creates a control which accepts only the digits 0-9 and virtual keys. The default styles SPBS_MASTER, WS_TABSTOP, and WS_VISIBLE are all in effect, though only WS_TABSTOP is specified. #define IDC_SPINBUTTON 302 #define IDD_SPINDLG 502 DIALOG "Spin button", IDD_SPINDLG, 11, 11, 200, 240, FS_NOBYTEALIGN | WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR BEGIN SPINBUTTON IDC_SPINBUTTON, 80, 20, 60, 24, SPBS_NUMERICONLY | WS_TABSTOP END ═══ 18.5.54. STRINGTABLE Statement ═══ Syntax: STRINGTABLE [load-option] [mem-option][codepage] BEGIN string-id string-definition . . . END The STRINGTABLE statement creates one or more string resources for an application. A string resource is a null-terminated character string that has a unique string identifier. A string resource can be loaded from the executable file when needed by using the WinLoadString or with DosGetResource with the RT_STRING resource type. RT_STRING resources are bundled together in groups of 16, with any missing IDs replaced with zero length strings. Each group, or bundle, is assigned a unique sequential ID. The resource string ID is not necessarily the same as the ID specified when using DosGetResource. The formula for calculating the ID of the resource bundle, for use in DosGetResource, is as follows: bundle ID = ( id / 16) +1 where id is the string ID assigned in the RC file. Thus, bundle 1 contains strings 0 to 15, bundle 2 contains strings 16 to 31, and so on. Once the address of the bundle has been returned by DosGetResource (using the calculated ID), the buffer can be parsed to locate the particular string within the bundle. The number of the string is calculated by the formula: string = id % 16 (string = remainder for id/16). The buffer returned consists of the CodePage of the strings in the first USHORT, followed by the 16 strings in the bundle. The first BYTE of each string is the length of the string (including the null terminator), followed by the string and the terminator. A zero length string is represented by two bytes: 01 (string length) followed by the null terminator. You can provide any number of STRINGTABLE statements in a resource script file. The compiler treats all the strings from the various STRINGTABLE statements as if they belonged to a single statement. This means that no two strings in a resource script file can have the same string identifier. load-option Specifies when the system loads the resource from the executable file into memory. This value must be one of the following: PRELOAD System loads the resource when the application starts. LOADONCALL System loads the resource when the application calls the WinLoadString function. This is the default option. mem-option Specifies how the system manages the resource when it is in memory. This value must be one or more of the following: code-page Specifies a code page value. See CODEPAGE Statement for a list of valid code page values. FIXED System keeps the resource at a fixed memory location. MOVEABLE System moves the resource as necessary to compact memory. DISCARDABLE System discards the resource if it is no longer needed. The default setting is MOVEABLE and DISCARDABLE. string-id Specifies the character-string identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. The value can be specified in decimal or hexadecimal notation. Each string identifier in a resource script file must be unique. string-definition Specifies a character string. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the string, you must include the double quotation mark twice. Comments You can continue a string on multiple lines by terminating the line with a backslash (\) or by terminating the line with a double quotation mark (") and then starting the next line with a double quotation mark. Example This example creates two string resources whose string identifiers are 1 and 2. #define IDS_HELLO 1 #define IDS_GOODBYE 2 STRINGTABLE BEGIN IDS_HELLO "Hello" IDS_GOODBYE "Goodbye" END ═══ 18.5.55. SUBITEMSIZE Statement ═══ Syntax: SUBITEMSIZE size The SUBITEMSIZE statement specifies the size, in words, of each help subitem in a help subtable. The minimum size is two words, and each help subitem in a help subtable must be the same size. When used, the SUBITEMSIZE statement must appear after the HELPSUBTABLE statement and before the BEGIN keyword. You do not need to use the SUBITEMSIZE statement if the help subitems are the default size (2). size Specifies the size of each help subitem. This value must be an integer. Example The SUBITEMSIZE statement in this example specifies that each HELPSUBITEM statement contains three words. HELPSUBTABLE 1 SUBITEMSIZE 3 BEGIN HELPSUBITEM IDCLD_FILEMENU, IDHP_FILEMENU, 5 HELPSUBITEM IDCLD_HELPMENU, IDHP_HELPMENU, 6 END ═══ 18.5.56. SUBMENU Statement ═══ Syntax: SUBMENU text, submenu-id [, menuitem-style] BEGIN menuitem-definition . . . END The SUBMENU statement creates a submenu for a given menu. A submenu is a vertical list of menu items from which the user can choose a command. You can provide any number of SUBMENU statements in a MENU statement, but each SUBMENU statement must specify a unique submenu-id value. You can provide any number of menuitem-definition statements in the SUBMENU statement. These define the menu items (commands) in the menu. The order of the statements determines the order of the menu items. text Specifies the text of the submenu. This field must contain zero or more characters enclosed in double quotation marks. Character values must be in the range 1 through 255. If a double quotation mark is required in the string, you must include the double quotation mark twice. A tilde ( ~ ) character in the item name indicates that the following character is used as a mnemonic character for the item. When the menu is displayed, the tilde is not shown, but the mnemonic character is underlined. The user can choose the menu item by pressing the key corresponding to the underlined mnemonic character. submenu-id Specifies the submenu identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. menuitem-style Specifies the submenu style. This value can be a combination of MIS_ values. For details on the MIS_ values, see MENUITEM Statement. menuitem-definition Specifies a PRESPARAMS or MENUITEM statement. You can use the PRESPARAMS statement to control the appearance of a submenu, such as the font and the foreground and background colors. If used, the PRESPARAMS statement must immediately follow the BEGIN keyword. For details about the PRESPARAMS statement, see PRESPARAMS Statement. The MENUITEM statement defines an individual command in the given menu. For details, see MENUITEM Statement. Example This example creates a submenu named Elements. Its identifier is 2. The submenu contains three menu items, which are created by using MENUITEM statements. SUBMENU "Elements", 2 BEGIN MENUITEM "Oxygen", 200 MENUITEM "Carbon", 201, , MIA_CHECKED MENUITEM "Hydrogen", 202 END ═══ 18.5.57. undef Directive ═══ Syntax: undef name This directive removes the current definition of the specified name. All subsequent occurrences of the name are processed without replacement. name Specifies the name to be removed. This value is any combination of letters, digits, and punctuation. Example This example removes the definitions for the names "nonzero" and "USERCLASS". #undef nonzero #undef USERCLASS ═══ 18.5.58. VALUESET Statement ═══ Syntax: VALUESET id, x, y, width, height[, style] The VALUESET statement creates a value set control within the dialog window. This control lets a user select one choice from a group of mutually exclusive choices. The VALUESET statement defines the identifier, position, dimensions, and attributes of a value set control. The predefined class for this control is WC_VALUESET. If you do not specify a style, the default style is WS_TABSTOP and WS_VISIBLE. id Specifies the control identifier. The value is any integer -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the control. The value is any integer -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog window. y Specifies the y-coordinate of the lower-left corner of the control. The value is any integer -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog window. width Specifies the width of the control. The value is any integer 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The width is in n-character units. height Specifies the height of the control. The value is any integer 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The height is in 1/8-character units. style Specifies the control styles. The value is any combination of the styles specified for WC_VALUESET. You can use the bitwise OR ( | ) operator to combine styles. Comments The VALUESET statement is used only in a DIALOG or WINDOW statement. Example This example creates a value set control at position (40, 40) within the dialog window. The value set control has a width of 220 character and a height of 20 character units. Its resource ID is 302. The style specification VS_ICON creates a control to show items in icon form. The default styles WS_TABSTOP and WS_VISIBLE are both in effect, though only WS_TABSTOP is specified. #define IDC_VALUESET 302 #define IDD_VALUESETDLG 501 DIALOG "Value set", IDD_VALUESETDLG, 11, 11, 260, 240, FS_NOBYTEALIGN | WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR BEGIN VALUESET IDC_VALUESET, 40, 40, 220, 160, VS_ICON | WS_TABSTOP END ═══ 18.5.59. WINDOW Statement ═══ Syntax: WINDOW text, id, x, y, width, height, class[ , style[ , framectl]] data-definitions [ BEGIN control-definition . . . END ] The WINDOW statement creates a window of the specified class. The statement defines the position and dimensions of the window relative to its parent window, as well as the window-box style. The WINDOW statement is typically used in a WINDOWTEMPLATE or FRAME statement. Typically, only one WINDOW statement is used in a FRAME statement. It defines the client window belonging to the corresponding frame window. The optional BEGIN and END keywords enclose any CONTROL statements that are given with the window. CONTROL statements given in this manner represent child windows belonging to the window created by the WINDOW statement. text Specifies the window title if the style specifies a title bar. This field must contain zero or more characters enclosed in double quotation marks. The character values must be in the range 1 through 255. If a double quotation mark is required in the title, you must include the double quotation mark twice. id Specifies the window identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. x Specifies the x-coordinate of the lower-left corner of the window. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The value is in dialog units. The position is relative to the origin of the parent window. y Specifies the y-coordinate of the lower-left corner of the window. This value must be an integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The value is in dialog units. The position is relative to the origin of the parent window. width Specifies the width of the window. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The value is in n-character units. height Specifies the height of the window. This value must be an integer in the range 0 through 65 535 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The value is in 1/8-character units. class Specifies the window class. This value can be one of the control classes specified in the "Control Classes" table in the Presentation Manager Programmer Reference or the name of the window class, enclosed in double quotation marks. style Specifies the window style. This value can be any of the window, dialog box, or frame styles specified. framectl Specifies the style of the frame controls belonging to the window. This value can be a combination of the styles specified in the table, "Frame-Control Styles." You can use the bitwise OR (|) operator to combine styles. data-definitions Specifies a CTLDATA and/or PRESPARAMS statement. These statements define control and presentation data for the window. For more information, see CTLDATA Statement and PRESPARAMS Statement. control-definition Specifies a CONTROL statement or any one of several predefined control statements. These statements define the style, position, and dimensions of controls in the window. Comments The WINDOW statement can actually contain any combination of CONTROL, DIALOG, and WINDOW statements. Typically, a WINDOW statement contains one or no such statements. Example This example creates a client window belonging to the frame window. The client window belongs to the "MyClientClass" window class and has the standard window identifier FID_CLIENT. WINDOWTEMPLATE 1 BEGIN FRAME "My Window", 1, 10, 10, 320, 130, 0, FCF_STANDARD | FCF_VERTSCROLL BEGIN WINDOW "", FID_CLIENT, 0, 0, 0, 0, "MyClientClass" END END ═══ 18.5.60. WINDOWTEMPLATE Statement ═══ Syntax: WINDOWTEMPLATE window-id [load-option] [ mem-option][code-page] BEGIN window-definition . . . END The WINDOWTEMPLATE statement creates a window template. A window template consists of a series of statements that define the window identifier, load and memory options, window dimensions, and controls in the window. The window template can be loaded from the executable file by using the WinLoadDlg function. You can provide any number of window templates in a resource script file, but each template must have a unique window-id value. window-id Specifies the window identifier. This value must be an integer in the range -32768 through 32767, or a simple expression that evaluates to a value in that range. load-option Specifies when the system loads the resource from the executable file into memory. This value must be one of the following: PRELOAD System loads the resource when the application starts. LOADONCALL System loads the resource when the application calls the WinLoadDlg function. This is the default option. mem-option Specifies how the system manages the resource when it is in memory. This value must be one or more of the following: FIXED System keeps the resource at a fixed memory location. MOVEABLE System moves the resource as necessary to compact memory. DISCARDABLE System discards the resource if it is no longer needed. The default setting is MOVEABLE and DISCARDABLE. code-page Specifies a code page value. See CODEPAGE Statement for a list of valid code pages. window-definition Specifies a WINDOW statement. The statement defines the dimensions and style of the given window. For details about the statement, see WINDOW Statement. Comments A WINDOWTEMPLATE statement can contain DIALOG, CONTROL, and WINDOW statements. Typically, only one WINDOW statement is used in the WINDOWTEMPLATE statement. ═══ 19. T Terminal Emulator ═══ The Kernel Debugger uses the T Terminal Emulator to communicate with the machine to be debugged, also known as the MUT (Machine Under Test). You can also use T to send and receive ASCII files. All functions of T are listed on the Help menu. Press F1 to view the Help menu, which is shown below. TERMINAL - OS/2 ASCII Terminal Program Version 2.00.00 F1 or ALT-H Help F2 Terminal Setup F3 Sending Files F4 Pausing and Scrolling F6 Receiving Files F8 or ALT-X Exit terminal program ═══ 19.1. Command-Line Syntax ═══ To display help for command-line syntax, type T -? at the prompt. OS/2 Terminal program Version 2.00.00 November 1, 1991 Valid command line switches: -L[ines]X X={lines} -C[om]N N={1..8} -Q[uiet] enter quiet mode -V[tp]:name name=vtp server -S[end]:name name=auto-send file name -R[emark]:text text=status line remark (20 chars max) ═══ 19.1.1. Command-Line Options ═══ Use command line options when invoking T to specify the screen size and the COM port to be used: -L[ines]X Where x = {25, 43, 50} -C[om]N Where n = {1,2,3} -? To display these options ═══ 19.2. Terminal Setup ═══ All terminal setup functions are listed here. Press F2 from the program's main screen to view the Terminal Setup menu. The Terminal Setup Options are as follows: o Help (press F1) o Port setup (Press F2) o Terminal emulation (Press F3) o Keyboard macros (Press F4) o Bells & Whistles (Press F5) o Exit setup mode (Press Esc or F8) You must press Esc to return to the main screen before continuing with any functions other than the above setup functions. ═══ 19.2.1. Setup Terminal Emulation ═══ To set up terminal emulation, follow these steps: 1. Press F2 at the main screen. The Terminal Setup dialog will be displayed. 2. Press F3. The Terminal Emulation Setup dialog will be displayed. Terminal Emulation Setup Emulator status: None loaded. Help: F1 Z19 emulator: F2 Exit emulator setup mode: Esc, F8 ═══ 19.2.2. Setup Bells & Whistles ═══ To change bells and whistles, follow these steps: 1. Press F2 at the main screen. The Terminal Setup dialog will be displayed. 2. Press F5. The Bells & Whistles Setup dialog will be displayed. 3. Make your selections. Bells and Whistles Setup Filter NULL characters: Yes Disable beeps: No Background: Foreground: Normal screen: Black White Status line: Blue Bright White Scroll screen: Blue Red Scroll status line: White Blue Help screen: Blue Bright White Menu: Blue Bright White Menu highlight: Cyan Black Next Value: ═══ 19.2.3. Setting Communications Parameters ═══ To change communications parameters, follow these steps: 1. Press F2 at the main screen. The Terminal Setup dialog will be displayed. 2. Press F2. The Current COM2 Port Parameters dialog will be displayed. Current COM2 Port parameters: Baud Rate: 9600 Parity: NONE Data Bits: 8 Stop Bits: 1 Write Timeout (sec.): 1.00 Read Timeout (sec.): 0.10 Handshaking: XON/XOFF Next Value: -> Previous Value: <- Next Field: Dn Previous Field: Up Don't Change: Esc Accept Changes: Enter 3. Use the Up Arrow and Down Arrow cursor keys to scroll backward and forward through the parameter list, and the -> and <- keys to scroll through allowable values for each parameter. 4. Press Escape to exit this dialog without changing values, or press Enter to save these values and exit the dialog. Note: The communications port may be changed from the command line by using the -c option. See Command-Line Options ═══ 19.3. Sending Files ═══ To send a file, follow these steps: 1. Press F3. The Send File Control dialog will be displayed. Send File Control Send file name: SEND.TXT Don't send file: Esc Accept changes and send file: Enter 2. Enter the filename in the Send File name field. 3. Press Enter to send the file and exit the dialog, or press Escape to exit this dialog without sending a file. ═══ 19.4. Pausing and Scrolling ═══ To enter Scroll Mode and pause display of communications, follow these steps: 1. Press F4. A status line will appear at the bottom of the screen. F1=Help ESC=Active mode Screen Top is 100% through the buffer. Scroll Mode 2. Press F1 to display the Scroll Mode commands. Screen Scroll Mode F1 or ALT-H Help Dn Down a line Up Up a line PgUp Up a page PgDn Down a page ESC or Enter Return to active mode 3. Select a scroll mode command. ═══ 19.5. Receiving Files ═══ To receive a file, follow these steps: 1. Press F6. The Capture File Control dialog will be displayed. Capture File Control Capture file name: Capture.Txt Capture entire buffer: F3 START Capture: F5 Delete file: F9 Don't Change: Esc Accept Changes: Enter 2. Select an item from the Capture File Control menu. ═══ 20. Workplace Class List ═══ The Workplace Class List is a tool that creates a workplace object class and an instance of a workplace object class. Workplace objects are constructed using the SOM protocol and are instances of one of the following workplace object classes: Predefined These classes are defined by the system. Examples of predefined workplace object classes are WPObject, WPFileSys, and WPAbstract. Subclass These classes are derived from existing predefined workplace object classes. They add or remove function; however, they retain the basic behavior of that class. Replaced These classes replace the class being subclassed. They modify the behavior of an instance of a predefined workplace object class without the instance being aware of the new class. ═══ 20.1. Starting Workplace Class List ═══ To start Workplace Class List, select the PM Development Tools folder, and then select Workplace Class List. A window appears. The window contains a list of the workplace object classes currently registered in the OS/2 Workplace Shell. Using the window, you can: o Create an instance of a workplace object class o Replace a workplace object class o Unreplace a workplace object class o Add a workplace object class o Delete a workplace object class ═══ 20.1.1. Creating an Object Class Instance ═══ To create an instance of a workplace object class: 1. Select the class from the list in the Workplace Object Class window. 2. Display the pop-up menu by clicking mouse button 2. 3. Select the Create Instance choice. Note: Only an instance of a physical workplace object class can be created. In other words, you cannot create instances of WPObject or WPClass because they are not physical classes. 4. Fill-in the following input fields: Object Title The text string you assign to the object. The text string becomes the object title and appears under the object when the object is displayed on the Workplace Shell. When the object is in an opened state, the text string appears in the title bar of the window. Class of new object The name of the class of which the object you selected is a member. Parameters A series of keyname=value pairs (separated by semicolons) that change the behavior of the object. Each object class defines the keynames and parameters it expects to see. All parameters have safe defaults, so it is never required to pass parameters to an object. Location A real name specified by a fully qualified file specification, such as C:\OS2\DLL\MINXOBJ.DLL, or a logical name specified by a predefined symbol. Examples of logical names include the following: LOCATION_NOWHERE Hidden folder LOCATION_DESKTOP OS/2 Desktop (Workplace) LOCATION_SYSTEM OS/2 System folder LOCATION_TEMPLATES Template folder LOCATION_SYSTEMSETUP System setup folder LOCATION_STARTUP Startup folder LOCATION_INFORMATION Information folder LOCATION_INFORMATION Information folder LOCATION_DRIVES Drives folder ═══ 20.1.2. Replacing a Workplace Object Class ═══ To replace an existing registered class: 1. Select the class from the list in the Workplace Object Class window. 2. Display the pop-up menu by single-clicking mouse button 2. 3. Select the Replace choice. Note that only classes that have already been registered are valid. 4. Fill-in the following input fields: Original class and Replacement class. Note: The replacement class must be a descendant of the original class. Replacing an object class is useful for modifying the behavior of objects which are instances of the original class but are not aware of the replacement class. Original class The name of the object class being replaced in the Workplace. Replacement class The name of the object class replacing the original class. ═══ 20.1.3. Unreplaceing a Workplace Object Class ═══ To return a replaced class to its original class: 1. Select the replaced class from the list on the workplace object class window. 2. Display the pop-up menu by clicking mouse button 2. 3. Select the Unreplace choice. Note that only classes that have already been replaced are valid. 4. Fill-in the following input fields: Original class The name of the replaced object class being returned to its original object class in the Workplace. Replacement class The name of the replaced object class being returned to its original object class. ═══ 20.1.4. Adding a Workplace Object Class ═══ To add a class to the Workplace Shell: 1. Display the pop-up menu by clicking mouse button 2. 2. Select the Add Class choice. 3. Fill-in the following input fields: New class name The name of object class you want to add to the Workplace. Type the class name exactly as it is built, case-sensitive. Library module The name of the dynamic link library (DLL) that holds the object definition. Type the library name with complete file specification information. Note: The DLL must be created by the IBM System Object Model. ═══ 20.1.5. Deleting an Object Class ═══ To delete a class from the Workplace Shell: 1. Select the class you want to delete from the list in the Workplace Object Class window. 2. Display the pop-up menu by clicking mouse button 2. 3. Select the Delete a Class choice. 4. Fill-in the name of the class you want to delete from the Workplace. Note: You cannot delete system predefined classes, such as WPObject or WPClass. ═══ 21. Error Messages ═══ ═══ 21.1. LINK386 Error Messages ═══ Format of Error Messages There are three types of LINK386 error messages: o Fatal errors cause LINK386 to stop running. They have the following format: location : fatal error L1xxx : message text o Nonfatal errors indicate problems in the executable file. LINK386 produces the executable file and sets the error bit in the header for the OS/2 environment. This means that the executable file cannot be run from OS/2. Nonfatal error messages have the following format: location : error L2xxx : message text o Warnings indicate possible problems in the executable file. LINK386 produces the executable file, but does not set the error bit in the header for the OS/2 environment. Warnings have the following format: location : warning L4xxx : message text In all these messages, location is the input file associated with the error, or it is LINK386 itself if there is no input file. The message text is the actual text message that LINK386 generates. When the input file is a module definition file, the line number is included, as in this example: myfile.def(3): fatal error L1030: missing internal name When the input file is an object file or library file and has a module name, the module name is enclosed in parentheses, as in the following examples: SLIBCE.LIB(_file) MAIN.OBJ(main.c) TEXT.OBJ Error Message Descriptions Fatal Error Messages (part 1) 1001 - 1049 Fatal Error Messages (part 2) 1050 - 1098 Fatal Error Messages (part 3) 1100 - 1130 Nonfatal Error Messages 2000 - 2063 Warning Error Messages 4000 - 4094 ═══ 21.1.1. Fatal Error Messages (Part 1) 1001 - 1049 ═══ L1001 option : option name ambiguous Explanation: A unique option name does not appear after the option indicator (/). Example: The command LINK386 /N main; produces this error because LINK386 cannot tell which of the seven options beginning with the letter N is intended. Action: Retry using the correct minimum option abbreviation. L1004 option : invalid numeric value Explanation: An incorrect value appeared for one of the LINK386 options. This might be because a character string has been entered for an option that requires a numeric value or because the proper numeric prefix (for example, 0x for hexadecimal) was not used for a numeric value. Action: Retry with a numeric value. L1006 option : stack size exceeds 65,535 bytes Explanation: The size you specified for the stack in the /STACK option of the link command is more than 65,535 bytes. Action: Retry with a stack size of less than or equal to 65,535 bytes. L1008 option : segment limit set too high Explanation: The specified limit on the /SEGMENTS option is greater than 16 375. Action: Retry with a limit in the range 1 to 16 375. L1020 no object modules specified Explanation: You did not specify any object file names to the linker. Action: Restart LINK386, including at least one object file name. L1021 cannot nest response files Explanation: A response file has been named within another response file. You have used @filename within the response file. The @ symbol is reserved by LINK386 to signify a response file name. Action: Edit the response file to remove the nested response file. L1022 response line too long Explanation: A line in an automatic response file is longer than 256 characters. Action: Edit the line to make it shorter than 256 characters. Response files can contain more than one line. L1023 terminated by user Explanation: You pressed Ctrl+C or Ctrl+Break. Action: Your action has terminated LINK386. Restart if necessary. L1030 missing internal name Explanation: You have not specified an internal name for an import in the module definition file. Action: Edit the module definition file, giving an internal name so that LINK386 can identify references to the import. L1031 module description redefined Explanation: You have used the DESCRIPTION keyword for a module in the module definition file more than once. Action: Edit the module definition file, deleting the extra descriptions. L1032 module name redefined Explanation: You have defined a module name more than once with the NAME or LIBRARY keyword in the module definition file. Action: Edit the module definition file, checking the module name definitions. L1033 input line too long; number characters allowed Explanation: The input line contains more than number characters. Action: Retry the command with fewer characters on the input line. L1040 too many exported entries Explanation: You have tried to export more than 65535 names. Action: Retry with fewer names, creating an additional executable module if necessary. L1041 resident-name table overflow Explanation: The total length of all your resident-names, together with an overhead of 3 bytes for each name, is greater than the LINK386 limit. The internal LINK386 limit is 65,534 for LINK386 versions prior to 2.01.012 and is 1,048,576 for LINK386 version 2.01.012 and later versions. Action: Reduce the number or the length of your resident names. L1042 nonresident-name table overflow Explanation: The total length of all your nonresident-names, together with an overhead of 3 bytes for each name, is greater than 65,534 for versions prior to 2.01.012 and is 1,048,576 for LINK386 version 2.01.012 and later versions. Action: Reduce the number or the length of your nonresident-names. L1043 relocation table overflow Explanation: There are more than 65,535 load-time relocations for a single segment. Action: Reduce the number of relocations in the source files and recompile or reassemble them. Interframe references generate load-time relocations. L1044 imported-name table overflow Explanation: The total length of all your imported-names, together with an overhead of 1 byte for each name, is greater than 65,535 bytes. Action: Reduce the number or the length of your imported-names. L1045 too many TYPDEF records Explanation: An object module contains more than 255 TYPDEF records. These records describe communal variables. This error can only appear with programs produced by compilers that support communal variables. Action: Reduce the number of TYPDEF records, breaking the module into smaller parts, if necessary. L1046 too many external symbols in one module Explanation: An object module specifies more than the limit of 1023 external symbols. Action: Reduce the number of external symbols, breaking the module into smaller parts, if necessary. L1047 too many group, segment, and class names in one module Explanation: The program module contains too many group, segment, and class names. Action: Reduce the number of groups, segments, or classes, and re-create the object files. L1048 too many segments in one module Explanation: An object module has more than 255 segments. Action: Reduce the number of segments, splitting the module or combining some segments. L1049 too many segments Explanation: The program has more than the maximum number of segments. The /SEGMENTS option specifies the maximum allowed number; the maximum is 16375. Action: Restart LINK386 using the /SEGMENTS option with an appropriate number of segments. ═══ 21.1.2. Fatal Error Messages (Part 2) 1050 - 1098 ═══ L1050 too many groups in one module Explanation: LINK386 found more than 32 group definitions (GRPDEF) in a single module. Action: Reduce the number of group definitions by splitting the module, by eliminating one or more group definitions, or combining group definitions. L1051 too many groups Explanation: The program defines more than 32 groups in addition to DGROUP. Action: Reduce the number of group definitions by splitting the module, by eliminating one or more group definitions, or combining group definitions. L1052 too many libraries Explanation: You tried to link with more than 32 libraries. Action: Combine libraries, or use modules that require fewer libraries. L1053 out of memory for symbol table Explanation: The program has more symbolic information, such as public, external, segment, group, class, and file names, than the amount that could fit in available real memory. Action: Combine modules or segments and recreate the object files. Eliminate as many public symbols as possible or use shorter names. L1054 requested segment limit too high Explanation: There is not enough memory to allocate the necessary tables for the amount of segments requested. Action: Reduce the number of segments by combining or creating additional executable modules. L1057 data record too large Explanation: A LEDATA record (in an object module) contained more than 1024 bytes of data. This is a translator (compiler or assembler) error. Action: Note which translator (compiler or assembler) produced the incorrect object module and the circumstances, and contact your supplier. L1060 program exceeds number bytes Explanation: There is not enough memory to process all segments. Action: Reduce the number of segments by combining or creating additional executable modules. L1063 out of memory for debugging information Explanation: LINK386 was given too many object files with debug information, and ran out of space to store them. Action: Reduce the number of object files that have debug information. L1064 out of memory - name heap exhausted Explanation: The linker ran out of heap space; name = near or far. Action: Reduce the number of background processes or install more memory. L1070 name: segment size exceeds 64K Explanation: A single segment contains more than 64K of code or data. This could be because you attempted to combine identically named segments. Action: Try compiling (or assembling) and linking using a larger memory model or breaking up the named segment. L1071 segment _TEXT larger than 65,520 bytes Explanation: This error is likely to occur only in small-model C programs, but it can occur when any program with a segment named _TEXT is linked using the /DOSSEG option of the LINK386 command. Small-model C programs must reserve code addresses 0 and 1; the reserve is increased to 16 for alignment purposes. Action: Make the program source code smaller, or change to a larger memory model. L1072 common area longer than 65,536 bytes Explanation: The program has more than 64K of communal variables. This error occurs only with programs produced by compilers that support communal variables. Action: Rewrite your program using fewer or smaller communal variables. L1073 file-segment limit exceeded Explanation: There are more than 255 physical or file segments. Action: Reduce the number of physical or file segments. You could use the Combine Contiguous Data (/PACKD) option for combining data segments or the Combine Contiguous Code (/PACKC) option for combining code segments. L1074 name: group larger than 64K Explanation: A group contains segments that total more than 65,536 bytes. Action: Reduce the number or size of segments or remove segments from the group. L1075 entry table larger than 65,535 bytes Explanation: You have exceeded a linker table size limit because of an excessive number of entry names. Action: Reduce the number of names in the modules that you are linking or create additional executable modules. L1076 name: segment size exceeds numberM Explanation: The named segment is larger than the specified size. Action: Break the segment into smaller segments and try again. L1077 common area longer than 4G-1 bytes Explanation: The space for the C languages common area is too big. Action: If the load module is an .EXE, consider putting some routines in .DLL; otherwise, link without debugging information or create additional executable modules. L1080 cannot open list file Explanation: The disk or a directory is full, or an invalid file name was specified. Action: Check that the file name specified is correct. Delete or move files to make space and restart LINK386. L1081 out of space for run file Explanation: The disk on which the .EXE file is being written is full. Action: Delete or move files to make space and restart LINK386. L1082 name: stub file not found Explanation: The stub file specified in the module definition file could not be found. Action: Check that the correct path to the stub file has been specified. L1083 cannot open run file - reason Explanation: The run file could not be opened for the stated reason. Action: Correct the problem and restart LINK386. L1088 out of space for list file Explanation: The disk on which the listing file is being written is full. Action: Delete or move files to make space and restart LINK386. L1089 filename: cannot open response file Explanation: LINK386 cannot find the specified response file. This usually indicates a typing error. Action: Include the drive specifier or path, or both, for the response file. L1091 unexpected end-of-file on library Explanation: The disk containing the library has probably been removed or is corrupted. Action: Replace the disk containing the library and restart LINK386. L1092 cannot open module definition file Explanation: The specified module definition file cannot be opened, or an invalid file name was specified. Action: Check that the specified file name is correct. Include the drive specifier or path, or both, for the module definition file. L1093 name: object not found Explanation: LINK386 could not open the object module you specified. Action: Specify full path name or directory in which object module resides. L1096 unexpected end-of-file Explanation: LINK386 encountered an end-of-file character while reading an input file AND expected more information. Action: Check input files for errors and relink. L1097 I/O error - string Explanation: The linker encountered the I/O error shown while reading from a file. Action: Make sure the file is not corrupted or on a bad disk sector and relink. L1098 cannot open include file filename - reason Explanation: LINK386 could not open the include file for the stated reason. Action: Correct the problem and restart LINK386. ═══ 21.1.3. Fatal Error Messages (Part 3) 1100 - 1130 ═══ L1100 stub .EXE file invalid Explanation: The stub file specified in the module definition file is not a valid .EXE file. Action: Ensure that the stub file is an executable file. L1101 invalid object module Explanation: One of the object modules was incorrectly formed during compilation or assembly. Action: Recompile or reassemble your source code. If the error persists, contact your supplier. L1102 unexpected end-of-file Explanation: An invalid format for a library was found. Action: Restore the library file from your backup disk and restart LINK386. If this does not work, rebuild your library or contact your supplier. L1103 name: attempt to access data outside segment bounds Explanation: A data record in an object module specified data extending beyond the end of a segment. This is a translator error. Action: Note which translator (compiler or assembler) produced the incorrect object module and the circumstances, and contact your supplier. L1104 filename: not valid library Explanation: The specified file is not a valid library file. This error causes LINK386 to stop running. Action: Ensure that the named file is a valid library file and restart LINK386. If this does not work, rebuild your library or contact your supplier. L1105 invalid object due to aborted incremental compile Explanation: An object file from an aborted compile is trying to be linked. Action: Recompile the source that produced the bad compile and then relink. L1106 unknown COMDAT allocation type for name; record ignored Explanation: The COMDAT (record in .OBJ) allocation type for the named COMDAT was not valid. Action: Recompile or reassemble .OBJ and try again. If that does not work, contact your supplier. L1107 unknown COMDAT selection type for name; record ignored Explanation: The COMDAT (record in .OBJ) selection type for the named COMDAT is not valid. Action: Recompile or reassemble .OBJ and try again. If that does not work, contact your supplier. L1108 invalid format of debugging information Explanation: An error was detected in a segment that contains debug information. Action: Recompile or reassemble and try again. If that does not work, try relinking without using the /DE or /CO options. L1113 unresolved COMDEF; internal error Explanation: LINK386 encountered a COMDEF (record in .OBJ) in pass 2 that was not defined in pass 1. Action: Recompile or reassemble and try again. If that does not work, contact your supplier. L1114 unresolved COMDAT name: internal error Explanation: LINK386 found specified COMDAT in pass 2 that does not correspond to COMDATs found in pass 1. Action: Recompile or reassemble and try again. If that does not work, contact your supplier. L1117 unallocated COMDAT name; internal error Explanation: The linker encountered COMDAT in pass 2 for which space was not allocated during pass 1. Action: Recompile or reassemble and try again. If that does not work, contact your supplier. L1121 name: group larger than 4G-1 bytes Explanation: The group indicated is too large. Action: Recompile or reassemble and try again. Remove segments from the group or create additional executables if necessary. L1123 name: segment defined both 16- and 32-bit Explanation: The segment named was defined as both 16-bit and 32-bit. Action: Create two segments (one for 16-bit, one for 32-bit), or make sure the segment is defined one way and relink. L1126 conflicting IOPL-parameter-words value Explanation: The IOPL parameter words in the .DEF file does not exactly match those in the corresponding EXPDEF object record. Action: Make sure .DEF file coincides with that defined in .OBJ. Relink. L1128 too many nested include files in module-definition file Explanation: The .DEF file exceeded a nesting level. Action: Combine some nestings into one .DEF file and try again. L1129 missing or bad include file name Explanation: LINK386 could not find a file included by .DEF file. Action: Make sure the file exists and can be located and that any path is specified correctly. Try again. L1130 internal fix-up applied to undefined area at offset in object number Explanation: LINK386 attempted to apply an internal fix-up beyond the defined limits of the object. Action: This is probably a compiler or assembler error. Revise the source file and re-create the object file. If that does not work, contact your supplier. ═══ 21.1.4. Fatal Error Messages (Part 4) 1200 - 1218 ═══ L1200 out of memory for page range information Explanation: The total size of all page range information is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. L1201 out of memory for contribution information Explanation: The total size of the contribution information is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. L1202 out of memory for executable string information Explanation: The total size of all executable string information is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. L1203 out of memory for identifier mangler DLL information Explanation: The total size of all identifier mangler DLL information is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. L1204 out of memory for object page table information Explanation: The total size of the object page table information is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. L1205 out of memory for fixup record information Explanation: The total size of all fixup record information is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. L1206 out of memory for fix up page table information Explanation: The total size of all fix up page table information is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. L1207 out of memory for import module information Explanation: The total size of the import module information is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. L1208 out of memory for page directory information Explanation: The total size of the page directory is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. L1209 out of memory for object page directory information Explanation: The total size of the object page director is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. L1210 out of memory for module reference table information Explanation: The total size of the module reference table is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. L1211 out of memory for chained relocation hash buckets Explanation: The total size of the relocation bucket is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. L1212 out of memory for chained relocation hash tables Explanation: The total size of the relocation hash tables is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. L1213 out of memory for entry point information Explanation: The total size of the entry point information is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. L1214 out of memory for entry table area Explanation: The total size of the entry table are is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. L1215 out of memory for imported names information Explanation: The total size of the imported names information is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. L1216 out of memory for comdat iterated data Explanation: The total size of all comdat iterated is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. L1217 out of memory for back patch information Explanation: The total size of the back patch information is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. L1218 out of memory for property list tables Explanation: The total size of the property list table is greater than the internal limit in LINK386. Action: Reduce the size of the executable, consider using dynamic link libraries to split the program into smaller modules. ═══ 21.1.5. Nonfatal Error Messages 2000 - 2063 ═══ L2000 imported starting address Explanation: A MODEND, or starting address record, referred to an imported name. Imported program-starting addresses are not supported. Action: The starting address record must refer to a non imported name. Edit the source file and recompile or reassemble. L2002 fix-up overflow at location in segment name Explanation: A fix up overflow occurred near location, in the named segment. See Conditions That Can Cause LINK386 Error 2002. Action: Revise the source file and re-create the object file. If that does not work, contact your supplier. L2003 inter segment self-relative fix-up at location in segment name Explanation: LINK386 detected an inter segment self-relative fix-up. A self-relative fix-up cannot be in another segment. This is probably caused by a near reference to procedure located in another segment. Action: Revise the source file and re-create the object file. If that does not work, contact your supplier. L2005 fix-up type unsupported at location in segment name Explanation: LINK386 detected an unsupported fix up type. This is probably a compiler or assembler error. Action: Revise the source file and re-create the object file. If that does not work, contact your supplier. L2010 too many fix-ups in LIDATA record Explanation: There are more fix ups applying to a LIDATA record than will fit into the LINK386's 1024 byte buffer. The buffer is divided between the data in the LIDATA record itself and the run-time relocation items. These are 8 bytes each, so the maximum varies from 0 to 128. This is probably a compiler error. Action: Revise the source file and re-create the object file. If that does not work, contact your supplier. L2011 name: NEAR/HUGE conflict Explanation: There are conflicting NEAR and HUGE attributes for a communal variable. This error can occur only with programs produced by compilers that support communal variables. Action: Specify only one of these attributes. L2012 name: array-element size mismatch Explanation: A far communal array has been declared with two or more different array-element sizes (for example, an array declared once as an array of characters and once as an array of real numbers). This error occurs only when using compilers that support far communal arrays. Action: Match the definitions and re-create the object module or modules. L2013 LIDATA record too large Explanation: A LIDATA record in an object module contains more than 512 bytes of data. It is likely that one of your assembler modules contains a complex structure definition or a series of deeply-nested DUP operators. (LIDATA is a DOS term.) Example: The following structure definition causes this error: alpha DB 10DUP(11 DUP(12 DUP(13 DUP(...)))) Action: Simplify the structure definition and reassemble the module. L2022 name (alias internalname) : export undefined Explanation: A name has been directed to be exported but is not defined anywhere. Action: Edit the source file and define the export. L2023 name (alias internalname) : export imported Explanation: An imported name has been directed to be exported. Items that are not in the source file itself cannot be exported. You cannot export this imported name. Action: Edit the source file to not export the imported name. L2024 name: special symbol already defined Explanation: Your program defined a symbol name that LINK386 already used for one of its low-level symbols. For example, the linker generates special names for overlay support. Action: Edit the source file and choose another name for the symbol. L2025 name: symbol defined more than once Explanation: A symbol has been defined more than once in the object file. Action: Edit the source file, removing the extra symbol definition. L2026 entry ordinal number, name name : multiple definitions for same ordinal Explanation: More than one entry point name has been assigned to the same ordinal in the module definition file. Action: Edit the module definition file to correct the usage of the ordinal. L2027 number: ordinal too large for export Explanation: You tried to export more than 3072 names or indicated too large of an ordinal. Action: Edit the source file or define smaller ordinals in the module definition file. L2029 string: unresolved external Explanation: A symbol declared to be external in one or more modules was not found among the given objects and libraries. Action: Supply files that will resolve these external calls. L2030 starting address not code (use class `CODE') Explanation: You specified a starting address to LINK386 that is not within a segment of type 'CODE.' Action: Reclassify the segment to CODE, or correct the starting point. L2044 string: symbol multiple defines, use /NOE Explanation: The symbol shown was defined more than once, perhaps for different things. Action: Recompile with the /NOEXDICTIONARY option. L2047 IOPL attribute conflict - segment: name in group:name Explanation: The segment indicated within the group shown has different IOPL attributes from the rest of the segments in the group. Action: Remove the segment from the group or make sure all segments have the same IOPL attributes. Relink. L2050 use16/use32 attribute conflict - segment:name in group:name Explanation: The segment indicated within the group shown has a different USE16/USE32 attribute from the rest of the segments in the group. Action: Remove the segment from the group or make sure all segments have the same USE16/USE32 attribute. L2052 name: unresolved external - possible calling convention mismatch Explanation: LINK386 encountered an undefined external, which could be a fast-call/C-call mismatch. Action: Make sure the external is defined and called the same way (for example, all C-calls). L2053 call gates are NOT allowed in 32-bit object if its size exceeds 64K - memory object number number Explanation: The memory object indicated is larger than 64K and uses call gates. Action: Remove the call gates or break the object into smaller portions. Relink. L2054 data for invalid page in segment name Explanation: LINK386 encountered data past the defined end of initialized data in the segment indicated. Action: The .OBJ is probably corrupted. Recompile or reassemble and try again. If that does not work, contact your supplier. L2055 fix-up for invalid page at location in segment name Explanation: LINK386 encountered a fixup past the defined end of initialized data in the segment indicated. Action: The .OBJ is probably corrupted. Recompile or reassemble and try again. If that does not work, contact your L2056 object type conflict - segment: name in group: name Explanation: The segment indicated within the group shown has a different TYPE attribute from the rest of the segments in the group. Action: Remove the segment from the group or make sure all segments have the same TYPE attribute. L2057 duplicate of name with different size found; record ignored Explanation: LINK386 encountered two COMDAT records with the selection type "SAME SIZE." The records have the same name but have different sizes. Action: The .OBJ is probably corrupted. Recompile or reassemble and try again. If that does not work, contact your L2058 different duplicate of name found; record ignored Explanation: LINK386 encountered two COMDAT records with the selection type "EXACT." The records have the same name but have different sizes. Action: The .OBJ is probably corrupted. Recompile or reassemble and try again. If that does not work, contact your L2059 size of the data block associated with name exceeds 4G Explanation: LINK386 encountered a continuation COMDAT record whose additional size made the communal data too large. Action: The .OBJ is probably corrupted. Recompile or reassemble and try again. If that does not work, contact your L2061 no space for the data block associated with record name inside the segment name Explanation: While being allocated space for a COMDAT record inside the segment indicated, the segment grew larger than 64K. Action: Make the segment smaller or move communal data into a different segment. L2062 continuation of COMDAT name has conflicting attributes; record ignored Explanation: While concatenating the COMDAT record indicated, LINK386 found attributes that differ from those defined in the initial COMDAT record. Action: The .OBJ is probably corrupted. Recompile or reassemble and try again. If that does not work, contact your L2063 name allocated in undefined segment Explanation: LINK386 encountered a COMDAT record in an undefined explicit allocation segment. Action: The .OBJ is probably corrupted. Recompile or reassemble and try again. If that does not work, contact your supplier. ═══ 21.1.6. Warning Error Messages 4000 - 4087 ═══ L4000 seg disp. included near location in segment name Explanation: This error is caused by using the LINK386 Warning of Fix-ups (/W) option. Action: The segment name and the location offset is displayed. L4001 frame-relative fix-up, frame ignored near location in segment name Explanation: A fix up occurred with a frame segment different from the target segment where either the frame or the target segment is not absolute. Such a fix-up is meaningless in the OS/2 environment, so the target segment is assumed for the frame segment. This error sometimes occurs if a 32-bit data item is referenced as if it were in a 16-bit segment or a 16-bit segment referenced as if it were in a 32-bit segment. Action: Check that this is acceptable. L4002 frame-relative absolute fix-up near location in segment name Explanation: A fix up occurred with a frame segment different from the target segment where both frame and target segments are absolute. This fix up is processed using base-offset arithmetic, but the warning is issued because the fix up might not be valid in the OS/2 environment. This error sometimes occurs if a 32-bit data item is referenced as if it were in a 16-bit segment or a 16-bit segment referenced as if it were in a 32-bit segment. Action: Check that this is acceptable. L4003 intersegment self-relative fix up at location in segment name Explanation: LINK386 found an intersegment self-relative fix-up at the specified location. This might cause a problem with the executable file. Action: The error might have been caused by the way the program was written or when it was compiled or assembled. L4004 possible fix-up overflow at location in segment name Explanation: LINK386 found a possible fix-up overflow at the specified location. This might cause a problem with the executable file. Action: The error might have been caused by the way the program was written or when it was compiled or assembled. L4005 32-bit fix-up in 16-bit record ignored at location in segment name Explanation: LINK386 encountered a 32-bit fix-up in a 16-bit record at the specified location. This might cause a problem with the executable file. Action: The error might have been caused by the way the program was written or when it was compiled or assembled. L4006 illegal 16-bit flat-relative offset fix-up at location in object name Explanation: LINK386 encountered an illegal 16-bit flat relative offset fix-up at the specified location. This might cause a problem with the executable file. This error sometimes occurs if a 32-bit data item is referenced as if it were in a 16-bit segment or a 16-bit segment referenced as if it were in a 32-bit segment. Action: The error might have been caused by the way the program was written or when it was compiled or assembled. L4007 illegal 16-bit flat-relative pointer fix-up at location in object name Explanation: LINK386 encountered an illegal 16-bit flat-relative pointer fix-up at the specified location. This error sometimes occurs if a 32-bit data item is referenced as if it were in a 16-bit segment or a 16-bit segment referenced as if it were in a 32-bit segment. Action: The error might have been caused by the way the program was written or when it was compiled or assembled. L4008 aliased fix-up to non-alias object near location in object name Explanation: LINK386 encountered an aliased fix-up to a non-alias object at the specified location. This error sometimes occurs if a 32-bit data item is referenced as if it were in a 16-bit segment or a 16-bit segment referenced as if it were in a 32-bit segment. Action: The error might have been caused by the way the program was written or when it was compiled or assembled. L4009 illegal target of flat-relative fix-up ignored at number in segment name Explanation: LINK386 encountered an illegal flat-relative fix-up at the specified location. Action: The error might have been caused by the way the program was written or when it was compiled or assembled. L4010 invalid alignment specification; assuming number Explanation: The number following the /ALIGNMENT option is not a power of 2, or is not in numerical form. The maximum alignment value is 4096. Action: If the default alignment of 512 is not acceptable, restart LINK386 using a valid number. L4017 name: unrecognized option name; option ignored Explanation: The option specified is not valid for LINK386. Action: Specify a valid option or remove the unrecognized option and relink. L4018 missing or bad application type; option name ignored Explanation: The /PMTYPE option was specified without an application type or with an invalid application type. Action: Relink with an application type of PM, VIO, or NOVIO. L4020 name: code segment size exceeds 65,500 Explanation: The code segment indicated is larger than 65,500 bytes and might not be reliable. Action: Break the segment into smaller segments and try again. L4021 no stack segment Explanation: The program does not contain a stack segment defined with the STACK combine type. Normally, every .EXE program should have a stack segment with the combine type specified as STACK. Action: You can ignore this message if you have a specific reason for not defining a stack or for defining one without the STACK combine type. L4022 name1, name2: groups overlap Explanation: Two groups are defined in such a way that one starts in the middle of another. This can occur if you defined segments in a module definition file or assembly file and did not correctly order the segments by class. Action: Edit the source file and reorder the segments in the group. L4023 name (alias): export internal name conflict Explanation: An exported name, or its associated internal name, conflicts with an already defined public symbol. Action: Edit the source file using new names. L4024 name: multiple definitions for export name Explanation: The module named has been exported more than once with different internal names. All internal names except the first one are ignored. Action: Edit the source file using new names. L4025 modname impname (intname): import internal name conflict Explanation: An imported name, or its associated internal name, is also defined as an exported name. The import name is ignored. The conflict could come from a definition in either the module definition file or an object file. Action: Edit the source file or module definition file using new names. L4026 modname impname (intname): self-imported Explanation: The module definition file directed that a name be imported from the module being produced. Action: Edit the module definition file. L4027 name: multiple definitions for import internal name Explanation: An imported name, or its associated internal name, is imported more than once. The imported name is ignored after the first mention. Action: Check that the name has been defined correctly. L4028 name: segment already defined Explanation: A segment is defined more than once with the same name in the module definition file. Segments must have unique names for LINK386. All definitions with the same name are ignored after the first mention. Action: Check that the segment has been defined correctly. L4029 name: DGROUP segment converted to type data Explanation: A segment that is a member of DGROUP has been defined as type CODE in a module definition file or object file. This probably happened because a CLASS keyword in a SEGMENTS statement was not given. Action: Check the module definition file syntax. L4030 name: segment attributes changed to conform with automatic data segment Explanation: The segment named is defined in DGROUP, but the shared attribute is in conflict with the instance attribute. Example: The shared attribute is NONSHARED and the instance attribute is SINGLE, or the shared attribute is SHARED and the instance attribute is MULTIPLE. The bad segment is forced to have the right shared attribute and the link continues. Action: Check that the LINK386 action is acceptable. L4031 name: segment declared in more than one group Explanation: A segment is declared to be a member of two different groups. Action: Correct the source file and re-create the object files. L4032 name: code-group size exceeds 65500 bytes Explanation: The code group indicated is larger than 65500 bytes and therefore might not be reliable. Action: Break the group into smaller groups or remove one or more segments and try again. L4036 no automatic data segment Explanation: The program or dynamic link library did not define a group named DGROUP. This is recognized by LINK386 as the automatic data segment. Action: Edit the source file. L4038 program has no starting address Explanation: The program did not contain a starting address. Physical Device Drivers do not have program starting addresses, so this error can be ignored when linking Physical Device Drives. Action: Recompile the program and try again. L4044 CODE segment :name in DATA group:name; assuming DATA Explanation: A CODE statement in a module definition file was used to define default attributes for a DATA segment. Action: Define a CODE statement and relink. L4045 name of output file is name Explanation: A dynamic link library file was created without specifying an extension. In such cases, LINK386 supplies an extension of .DLL. This is to warn you in case you expected an .EXE file to be generated Action: No action. L4046 DATA segment: name in CODE group: name; assuming CODE Explanation: A DATA statement in a module definition file was used to define default attributes for a CODE segment. Action: Define a DATA statement and relink. L4048 ignoring non-zero heap size Explanation: The module definition file does not contain a HEAPSIZE statement. Action: Edit the file and relink. L4049 ignoring non-zero stack size Explanation: The module definition file does not contain a STACKSIZE statement. Action: Edit the file and relink. L4051 filename: cannot find library Explanation: LINK386 could not find the specified library file. Action: Enter a new file name, a new path specification, or both. L4053 VM.TMP :illegal file name; ignored Explanation: VM.TMP cannot be used for an object file name. Action: Rename the file and restart LINK386. L4054 filename: cannot find file Explanation: LINK386 could not find the specified file. Action: Enter a new file name, a new path specification, or both. L4067 changing default resolution for weak external name from oldname to newname Explanation: LINK386 encountered a redefinition of a default resolution and is changing it to the value indicated. Action: If the change is OK, no action is required; otherwise, fix the module definition file and try again. L4068 ignoring stack size greater than 64K Explanation: LINK386 encountered a stack greater than 64K or zero and is assuming a stack size of 65,534. Action: Edit the file and relink. L4069 filename truncated to name Explanation: LINK386 encountered a file name greater than 256 bytes (including terminating null) and truncated it to the size indicated. Action: Edit the file and relink. L4071 application type not specified; assuming name Explanation: An application type of WINDOWAPI, WINDOWCOMPAT, NOTWINDOWCOMPAT, or PRIVATE was not specified. LINK386 is assuming the application type indicated. Action: Edit the file and relink. L4072 changing application type from oldname to newname Explanation: The application type specified with /PMTYPE is different from that in .DEF file. LINK386 is using the application type indicated. Action: Edit the file and relink. L4073 name: 32-bit aliased data segment size exceeds 64K Explanation: The segment indicated is greater than 64K in length and is a 32-bit aliased data segment Action: If this is expected, do nothing; if not, break into smaller segments. L4074 attribute conflict for segment name; ignoring attribute type Explanation: The segment indicated for the .DEF file is defined with conflicting characteristics. LINK386 is ignoring the attribute indicated. Action: Edit the file and relink. L4075 object type conflict - assuming name Explanation: The .DEF files specified conflicting attributes for an object; only one of the following attributes are allowed: RESIDENT, NONPERMANENT, PERMANENT, CONTIGUOUS, or DYNAMIC. LINK386 is assuming the attribute indicated. Action: Edit the file and relink. L4077 symbol name not defined; ordered allocation ignored Explanation: While doing ordered allocation of COMDAT records, LINK386 encountered an undefined COMDAT record; ordered allocation is determined from the .DEF file. Action: Edit the file and relink. L4079 symbol name already defined for ordered allocation; duplicate ignored Explanation: While processing ORDER list in .DEF file, LINK386 encountered a COMDAT record already defined for ordered allocation. Action: Edit the file and relink. L4080 changing substitute name for alias name from name to name Explanation: LINK386 encountered an alias redefiniton and is changing it to the values indicated. Action: If this is OK, no action is required. Otherwise, edit the file and relink. L4082 name ignored for module with 16-bit starting address Explanation: LINK386 encountered a DLL module with a 16-bit entry point requesting termination. Only modules with 32-bit entry points can specify DLL termination. Action: Remove the termination request from the module definition file. L4083 invalid base address specification; assuming number Explanation: The base address specified with the /BASE option or in the module definition file is illegal, and LINK386 is assuming the given value. Action: Change the base address if necessary; otherwise, ignore the message. L4084 module name truncated to string Explanation: The module name was truncated to the number of characters indicated. Action: If this action is satisfactory, no action is required. Otherwise, edit the module definition file and shorten the name. L4085 name (alias alias name): forwarder entry created for imported export Explanation: LINK386 created a forwarder entry within the entry table for the named export. Action: If this action is satisfactory, no action is required. L4087 internal fix-up applied to uninitialized area at offset in object number Explanation: LINK386 attempted to apply an internal fix-up beyond the initialize limits of the object. Action: If this is acceptable, no action is required. If the problem continues, you might want to disable based addressing. L4090 cannot load identifier manipulation DLL name Explanation: LINK386 detected an error while trying to load an identifier manipulator dynamic link library. This DLL was specified in an object file, and is used by LINK386 to demangle a compiler generated mangled name into a function prototype when printing an error message. Error messages will not be demangled for this object file. Action: Make sure the appropriate identifier manipulator DLL is in the LIBPATH. L4091 cannot locate procedure in identifier manipulation DLL name Explanation: LINK386 detected an error while trying to load a procedure from an identifier manipulator dynamic link library. This DLL was specified in an object file, and is used by LINK386 to demangle a compiler generated mangled name into a function prototype when printing an error message. Error messages will not be demangled for this object file. Action: Make sure the appropriate identifier manipulator DLL is in the LIBPATH. L4092 too many identifier manipulation DLLs Explanation: Too many identifier manipulator dynamic link libraries have been specified. These DLLs are specified in object files, and are used by LINK386 to demangle compiler generated mangled names into function prototypes when printing an error messages. Error messages may not be demangled for some object files. Action: Reduce the number of different compilers used to create the objects. L4093 cannot initialize identifier manipulation DLL name Explanation: LINK386 detected an error while trying to initialize an identifier manipulator dynamic link library. This DLL was specified in an object file, and is used by LINK386 to demangle a compiler generated mangled name into a function prototype when printing an error message. Error messages will not be demangled for this object file. Action: Make sure the appropriate identifier manipulator DLL is in the LIBPATH. L4094 increasing stack size from number to number Explanation: The stack size specified by either 1. size of a segment with combine type stack 2. STACKSIZE statement in the .DEF file 3. /STACK LINK386 command line option will cause a system error if the program is executed on an OS/2 2.x system. LINK386 has changed the stacksize to a larger value to preserve compatibility. Action: No action required, LINK386 has corrected the problem. To eliminate the warning message, restart LINK386 and specify the new stack size. ═══ 21.1.7. Conditions That Can Cause LINK386 Error 2002 ═══ LINK386 Error 2002 can be caused by the following conditions: o A group is larger than 64K. o The program contains an intersegment short jump or intersegment short call. o The name of a data item in the program conflicts with that of a subroutine in a library included in the link. o An EXTRN declaration in an assembler language source file appeared inside the body of a segment, as in the following example: code SEGMENT public 'CODE' EXTRN main:far start PROC far call main ret start ENDP code ENDS The following construction is preferred: EXTRN main:far code SEGMENT public 'CODE' start PROC far call main ret start ENDP code ENDS ═══ 22. Make Message File (MKMSGF) Error Messages ═══ MKMSGF: Codepage %s is all zeroes Explanation: The code-page ID specified with the /P option is zero. The message file is built with a code-page of zero. Action: Retry the command using the correct code-page specification. MKMSGF: Codepage %s error in numeric conversion Explanation: The code-page ID specified with the /P option is not numeric. The message file is built with a code-page of zero. Action: Retry the command using the correct code-page specification. MKMSGF: Codepage %s is too large Explanation: The code-page ID specified with the /P option is too large. The message file is built with a code-page of zero. Action: Retry the command using the correct code-page specification. MKMSGF: Country %u is not supported Explanation: The country ID specified within the /D option is not supported. MKMSGF processing is stopped. Action: Retry the command using the correct country code specification. MKMSGF: DBCS code page not found Explanation: No DBCS code page has been found that supports the DBCS range specified in the /D option. MKMSGF processing is stopped. Action: Retry the command using the correct DBCS ranges or country ID for the input message file. MKMSGF: Error reading input file Explanation: Error during input from source file. Action: Make sure the source message file exists and that the drive is ready. Retry the command. MKMSGF: Error writing output file Explanation: Error during output to target file. Action: Make sure there is sufficient disk space or that the drive is ready. Retry the command. MKMSGF: File not found Explanation: Input file could not be found. Action: Retry the command, using the correct source message file name. MKMSGF: Infile[.ext] outfile[.ext] [/V] [/D ] [/P ] [/L ] Explanation: This is the proper syntax for MKMSGF. It is displayed when no operands are specified on the command line and after some syntax errors. Action: None. MKMSGF: Input file same as output file Explanation: The input and output file names are the same. Processing is stopped. Action: Correct the command line or the control file and restart MKMSGF. MKMSGF: Insufficient storage Explanation: Not enough storage to execute program or too many messages in the file. Message limit is about 6000. Action: Reduce the number of programs running in your system, or reduce the size of the message file by either deleting messages or by reducing the size of each message. Retry the command. MKMSGF: Invalid language or sub id Explanation: The language family ID specified with the /L option is not supported. Action: Retry the command using the correct language family ID. MKMSGF: Invalid message file format Explanation: Input file is not a recognizable message text file. Action: If an incorrect file name was entered, retry the command with the correct source message file name. MKMSGF: Language family %s is all zeroes Explanation: The language family ID specified with the /L option is zero. The message file is built with a language family ID of zero. Action: Retry the command using the correct language family ID. MKMSGF: Language family %s error in numeric conversion Explanation: The language family ID specified with the /L option is not numeric. The message file is built with a language family ID of zero. Action: Retry the command using the correct language family ID. MKMSGF: Language family %s is too large Explanation: The language family ID specified with the /L option is not supported. The message file is built with a language family ID of zero. Action: Retry the command using the correct language family ID. MKMSGF: Message ID out of sequence Explanation: A message was detected that was out of the required sequential order. Action: Correct the error by editing your source message file and renumbering the messages. You might also want to delete or insert the appropriate message numbers to achieve the required sequential order. MKMSGF: Message XXXX too long Explanation: The message was too long to be processed (limit is approximately 2K characters). Action: Correct the error by editing your source message file and making the message shorter. Then, retry the command. MKMSGF: More than NN codepages entered Explanation: A maximum of NN code-page IDs may specified for a single message fil e, Only the first NN will be accepted. Action: Retry the command using the correct code-page specifications. MKMSGF: No sub id using 1 default Explanation: The language version ID specified with the /L option is either invalid or not supported. The message file is built using the default value shown. Action: Retry the command using the correct language version ID. MKMSGF: Sub id %s error in numeric conversion Explanation: The language version specified with the /L option is not numeric. The message file is built with a default language version. Action: Retry the command using the correct language version ID. MKMSGF: Syntax error Explanation: You entered the command incorrectly. Action: Retry the command using proper syntax. To display the proper syntax, type MKMSGF at the command line. ═══ 22.1. Message Segment Binder (MSGBIND) Error Messages ═══ MSGBIND: I/O error seeking infile Explanation: A disk error occurred while seeking either the message file or the .EXE file. Action: Run CHKDSK on the drive containing the file and restart MSGBIND. MSGBIND: I/O error writing file Explanation: A disk error occurred while writing messages to the .EXE file. Action: Run CHKDSK on the drive containing the .EXE file, and restart MSGBIND. MSGBIND: Must specify .EXE file before message file Explanation: The input file was in error. Action: Correct input file. MSGBIND: Must specify message file before message number Explanation: The input file was in error. Action: Correct the input file. MSGBIND: Out of memory, needed xxxx bytes Explanation: There was not enough memory available to run MSGBIND. Action: Reduce the number of programs presently running in your system and restart MSGBIND. MSGBIND: Premature EOF during copy Explanation: The .EXE file was not built correctly. Action: Rebuild the .EXE file and restart MSGBIND. MSGBIND: Unable to create temp file-MSGBIND.TMP Explanation: An error occurred while creating the intermediary file MSGBIND.TMP. Action: Delete or move files to make disk space available. If MSGBIND.TMP is present as a read-only file, it must first be deleted. Restart MSGBIND. MSGBIND: Unable to open xxxxxxxx Explanation: The input file specified was not found or an error occurred when opening the message file. Action: Restart MSGBIND using the correct input file name or a backup copy of the message file. Number of Message Files exceeded. Only nnn allowed Explanation: The number of message files specified in the input file exceeds the maximum number of files that MSGBIND can process at one time. Action: Correct the input file or combine message files, and then restart MSGBIND. Reading messages from xxxxxxxx Explanation: Messages from the displayed message file are being read into memory. Action: None. This message is for information only. Reading messages from xxxxxxxx -file not found Explanation: The message file was not found in the path specified in the input file. Action: Edit the input file, correcting the path or file name, or both. Restart MSGBIND. Reading messages from xxxxxxxx -not created with MKMSGF program Explanation: The message file displayed was not created using the MKMSGF program. Action: Convert the source message file to a formatted message file using the MKMSGF program, and restart MSGBIND. See the Make Message File (MKMSGF). Reading messages from xxxxxxxx -not enough memory Explanation: There was not enough memory available to store the messages. Action: Reduce the number of programs running in your system, and restart MSGBIND. The object that would contain the bound messages would be too large. Refer to the Toolkit Documentation for more information. Explanation: (self explanatory) Action: Do one or more, of the following: 1. Modify the module definition file to isolate the message object, and then relink the application. 2. Reduce the number of messages to be bound to the application as specified in the input file. 3. Reduce the size of the messages and rebuild the message file with MKMSGF. 4. Then restart MSGBIND. Unable to bind message nnnn, message segment would exceed 64K. The remaining messages will NOT be bound. Explanation: (self explanatory) Action: Do one or more, of the following: 1. Modify the module definition file to isolate the message object, and then relink the application. 2. Reduce the number of messages to be bound to the application as specified in the input file. 3. Reduce the size of the messages and rebuild the message file with MKMSGF. 4. Then restart MSGBIND. Unable to locate call to Dos32GetMessage, messages will not be bound. Explanation: The executable file to be modified makes no function calls to the message retriever, or was not linked with the correct library file. Action: If the application does use the message retriever function, such as DosGetMessage, relink the application using the correct library file, and then restart MSGBIND. If not, messages cannot be bound to the application. Updating xxxxxxxx Explanation: The .EXE file name displayed is being updated with the requested messages. Action: None. This message is for information only. Updating xxxxxxxx -file not found Explanation: The .EXE file name was not found in the path specified in the input file. Action: Edit the input file, correcting the path or file name, or both. Restart MSGBIND. Updating xxxxxxxx -not linked with MSGSEG.OBJ Explanation: The .EXE file name displayed made no DosGetMessage functions, or the .EXE file was not linked with the correct library. Messages can only be bound to applications that call message retriever functions, such as DosGetMessage. Action: If the .EXE file does make calls to message retriever functions, relink the application using the correct library, and restart MSGBIND. usage: MSGBIND scriptfile Explanation: The command was entered incorrectly. Action: Restart MSGBIND. Refer to Syntax for the correct syntax. Warning: No msgseg data found in new executable Explanation: The executable file to be modified makes no function calls to the message retriever, or was not linked with the correct library file. Action: If the application does use the message retriever function, such as DosGetMessage, relink the application using the correct library file, and then restart MSGBIND. If not, messages cannot be bound to the application. WARNING: Skipping messages for this file Explanation: The .EXE file was in error, so the messages were not bound to it. Either the .EXE file does not exist, or it has not been linked with the correct library. Action: If the .EXE file name is correct, relink the application using the correct library, and restart MSGBIND. WARNING: Skipping message numbers for this file Explanation: The message file was in error, so all messages from this message file were ignored. The message file might not exist, might not be formatted correctly, or there might not be enough memory to store all the messages. Action: If the message file name is correct and has been correctly formatted, check the memory available for the file. Restart MSGBIND. WARNING: xxxx is an invalid message number Explanation: The message number specified was not found in the message file. Action: Edit the input file and correct any message numbers that are in error. Restart MSGBIND. Writing messages Explanation: The .EXE file is being updated with the messages requested. Action: None. This message is for information only. ═══ 22.2. Resource Compiler Error Messages ═══ The error messages produced by the resource compiler utility (RC) and its preprocessor are listed below. RC Preprocessor Fatal Error Messages Error Message Descriptions C1012 bad parenthesis nesting - missing symbol Explanation: You wrote an expression which was missing the given left or right parenthesis symbol. Action: Rewrite the expression with balanced parentheses. C1014 too many include files Explanation: You might have tried to include a file recursively. Action: Remove the include directive for any file which has already been included to the preprocessor. C1015 cannot open include file 'filename' Explanation: The preprocessor could not locate the given include file. Action: If the include file is not in the current directory or in a directory named in the INCLUDE environment variable, or in a directory specified by a -i option, you must provide the full path and include file name. C1016 #if[n]def expected an identifier Explanation:You wrote an ifdef or ifndef directive with no macro name. Action: Supply the missing name. C1017 invalid integer constant expression Explanation: You used an incorrect expression where an integer constant was expected. Action: Supply a correct expression to the directive. C1018 unexpected #elif Explanation: You used a directive in an incorrect context. Action: Correct the logic of the if directives. C1019 unexpected #else Explanation: You used a directive in an incorrect context. Action: Correct the logic of the if directives. C1020 unexpected #endif Explanation: You used a directive in an incorrect context. Action: Correct the logic of the if directives. C1021 bad preprocessor command 'command' Explanation: The given command is not a recognized directive. You might have misspelled the directive. Action: Use the correct spelling for the directive. C1022 expected #endif Explanation: You wrote an if directive but omitted any endif. Action: Supply the missing endif directive. C1056 compiler limit 'name' out of macro expansion space Explanation: The macro called name expanded to a length exceeding 2042 bytes. Action: Revise your definition of the macro so that its value is shorter than the length limit. C1065 compiler limit 'name' macro definition too big Explanation: The macro called name expanded to a length exceeding 2042 bytes. Action: Revise your definition of the macro so that its value is shorter than the length limit. Resource Compiler Preprocessor Error Messages C2001 newline in constant Explanation: You wrote a string literal constant without the closing double quotation mark. Action: Provide the ending double quote for the string. C2004 expected defined(id) Explanation: You wrote an if defined directive but omitted the macro name. Action: Supply the missing macro name. C2006 #include expected a file name,found text Explanation: The preprocessor found the given text instead of an include file name. Action Supply the correct include file name. C2007 #define syntax Explanation: The syntax of your define directive is incorrect. Action: Use the correct form as described for the define directive. C2014 preprocessor command must start as first non-white space Explanation: You wrote a directive with text on the line before the number sign (#). Action: Put the number sign at the beginning of a line. RC Preprocessor warnings C4005 name redefinition Explanation: You attempted to redefine the macro name to a value different from its current definition. Action: To use a different macro value, define it as a macro using another macro name. C4067 unexpected characters following include directive -newline expected Explanation: You specified a filename to an include directive without surrounding the name by double quotation marks or angle brackets. Action: Use double quotation marks or angle brackets around the include filename. C4067 unexpected characters following 'endif' directive - newline expected Explanation: No characters should appear on the line of an endif or else directive after the directive keyword. Action: Remove the extra characters. C4067 unexpected characters following 'else' directive-newline expected. Explanation: No characters should appear on the line of an endif or else directive after the directive keyword. Action: Remove the extra characters. C4067 unexpected characters following 'undef' directive - newline expected Explanation: You can undefine only one macro on an undef directive. Action:Use separate undef directive to undefine more than one macro. Accelerator type required (CHAR, SCANCODE, or VIRTUALKEY) Explanation: An acceloption has not been specified in the accelerator table to define the type of accelerator. If the accelerator character code is something other than a single character or a character preceded by a caret ( ^ ), an acceloption is required. Action: Check accelerator table syntax. BEGIN expected in accelerator table Explanation: BEGIN keyword missing from accelerator table. Action: Check syntax. BEGIN expected in dialog or window template Explanation: BEGIN keyword missing from dialog or window template. Action: Check syntax. BEGIN expected in menu Explanation: BEGIN keyword missing from menu. Action: Check syntax. BEGIN expected in message table Explanation: BEGIN keyword missing from message table. Action: Check syntax. BEGIN expected in RCData Explanation: BEGIN keyword missing from RCData table. Action: Check syntax. BEGIN expected in String Table Explanation: BEGIN keyword missing from string table. Action: Check syntax. Cannot re-use message constants Explanation: Message identifier has been used more than once in message table. Action: Check message table syntax. Cannot re-use string constants Explanation: Message identifier has been used more than once in string table. Action: Check string table syntax. Comma expected after item string Explanation: A comma must be used to separate the menu item identifier and the menu item string. Action: Check menu syntax. Control character out of range ( ^A - ^Z) Explanation: Accelerator character codes that use the Ctrl key, and are therefore preceded by a caret ( ^ ), must use alphabetic keys. Action: Check accelerator table syntax. END expected in dialog Explanation: END keyword missing from dialog template. Action: Check syntax. END expected in menu Explanation: END keyword missing from menu. Action: Check syntax. Error creating temp file Explanation: Temporary files are created by the resource compiler during the compilation process. Action: Check that there is sufficient disk space to run the resource compiler, and restart the resource compiler. Expected comma in accelerator table Explanation: Commas are used in the accelerator table to separate the accelerator key, the accelerator command, and the accelerator options. Action: Check accelerator table syntax. Expected ID value for menu item Explanation: A selection identifier is needed for each item within a menu. Action: Check menu syntax. Expected menu string Explanation: A character string should be specified in the menu definition to describe the menu selection. Action: Check menu syntax. The string should be enclosed in double quotation marks. Expected numeric command value Explanation: A number should be used in the accelerator table to identify the message that is generated by an accelerator key. Action: Check accelerator table syntax. Expected numeric constant in message table Explanation: The identifier that precedes a message definition must be an integer. Action: Check message definition syntax. Expected numeric constant in string table Explanation: The identifier that precedes a string definition must be an integer. Action: Check string definition syntax. Expected numerical dialog constant Explanation: Integers are required in dialog and window templates to specify the coordinates and dimensions of the dialog box. Action: Check syntax of dialog box definition. Expected string in message table Explanation: A character string was not found in the message table. Action: Check syntax. The string should be enclosed in double quotation marks. Expected string in string table Explanation: A character string was not found in the string table. Action: Check string table syntax. The string should be enclosed in double quotation marks. Expected string or constant accelerator command Explanation: The accelerator character code is missing. Action: Check accelerator table syntax. File not found Explanation: The resource compiler could not find the .RC or .RES file that you requested. Action: Check that the file is in the current directory and check the path to the directory. Illegal empty BEGIN/END block found, resource not written Explanation: A BEGIN/END block with no DIALOG, CONTROL, or WINDOW statements in it was found in the dialog template. Action: Delete unwanted BEGIN/END blocks. Invalid accelerator Explanation: The character code specified as an accelerator key must be a valid keyboard operation. Action: Check accelerator key definition syntax. Invalid accelerator option Explanation: The accelerator option must be a valid keyword. Action: Check syntax. Invalid control character Explanation: The accelerator key definition can include a caret ( ^) to specify that the key should be used with the Ctrl key. Action: Check accelerator key definition syntax. Invalid Type Explanation: The resource type must be a valid keyword. Action: Check resource definition syntax. Non-numeric template ID in dialog or window template Explanation: The resource identifier must be an integer. Action: Check dialog or window template syntax. Only one top level window allowed Explanation: Only one DIALOG, CONTROL, or WINDOW statement is allowed within the dialog or window template. Action: Check dialog or window template syntax. Resource Type keyword expected Explanation: The resource type must be specified in the resource script file. Action: Check resource definition syntax. String literal too long Explanation: Strings cannot be longer than 255 characters. Action: Edit the string. Text string or ordinal expected in control Explanation: A text string can be specified in the DIALOG statement of a dialog template to give it a title. If a title is not required, double quotation marks must be used with no characters between them (" "). Action: Edit DIALOG statement. Unbalanced parentheses Explanation: The left and right parentheses have not been matched. Action: Edit the parentheses. Undefined keyword or key name Explanation: An invalid keyword or key name has been used. Action: Check syntax. Unexpected end of file in string literal Explanation: The double quotation marks have not been closed at the end of a character string. Action: Edit the string. Unexpected value in RCData Explanation: The variable defined in RCData must be a string or a number. Action: Check the RCData syntax. Unknown dialog or window token Explanation: The dialog and window templates must use only the DIALOG, WINDOW, or CONTROL keywords. Action: Check the dialog or window template syntax. Unknown menu sub type Explanation: Items within a menu can be specified only with the MENUITEM and SUBMENU keywords. Action: Check menu definition syntax. ═══ 22.3. NMAKE Error Messages ═══ This section provides a convenient reference to the many error messages that can be encountered when using the NMAKE facility. Error Message Descriptions NMAKE Fatal Error Messages (Part 1) 1000 - 1098 NMAKE Warnings (Part 2) 4001 - 4008 NMAKE Informational Messages (Part 3) 2 - 6 ═══ 22.3.1. Fatal Error Messages (Part 1) 1000 - 1098 ═══ U1000 syntax error : ')' missing in macro invocation Explanation: A left parenthesis appeared without a matching right parenthesis in a macro invocation. The correct form is $(name). Action: Add the right parenthesis in the proper syntax. U1001 syntax error : illegal character 'character' in macro Explanation: A non-alphanumeric character other than underscore appeared in a macro. Action: Use only characters valid for a macro name. U1002 syntax error : bad macro invocation '$' Explanation: A single dollar sign ($) appeared without a macro name associated with it. The correct form is $(name). Action: Use a defined macro name. U1003 syntax error : '=' missing in macro Explanation: The = sign was missing in a macro definition. The correct form is 'name = value'. Action: Insert an equals sign (=) and retry. U1004 syntax error : macro name missing Explanation: A macro invocation appeared without a name. The correct form is $(name). Action: Supply the macro name and retry. U1005 syntax error : text must follow ':' in macro Explanation: A string substitution was specified for a macro, but the string to be changed in the macro was not specified. Action: Specify the string to be substituted. U1006 syntax error : missing closing double quotation mark Explanation: An opening double quotation mark appeared without a closing quotation mark. Action: Edit the line and add the closing quotation mark. U1007 double quotation mark not allowed in name Explanation: You used a ' " ' symbol inside a macro name. Action: Correct the name without the quotation mark. U1017 unknown directive 'directive' Explanation: The directive specified is not a recognized directive. Action: Check your spelling of the intended directive. U1018 directive and/or expression part missing Explanation: The directive is incompletely specified. The expression part is required. Action: Supply the expression and retry the directive. U1019 too many nested if blocks Explanation: You exceeded the limit of 16 levels of nested !IF directives. Action: Simplify your nesting logic to fewer than 16 levels. U1020 EOF found before next directive Explanation: A directive, such as !ENDIF, was missing. Action: Insert the required directive and retry. U1021 syntax error : else unexpected Explanation: An !ELSE directive was found that was not expected, or was placed in a syntactically incorrect place. Action: Correct the position of the !ELSE directive. U1022 missing terminating character for string/program invocation : 'character' Explanation: The closing double quotation mark in a string comparison in an !IF directive was missing. Or else the closing bracket ( ] ) in a program invocation in a directive is missing. Action: Insert the proper termination character. U1023 syntax error present in expression Explanation: An expression is incorrect. Action: Check the allowed operators and operator precedence for the expression. U1024 illegal argument to !CMDSWITCHES Explanation: An unrecognized !CMDSWITCHES option was specified. Action: Use the correct !CMDSWITCHES option. U1031 file name missing (or macro is null) Explanation: An !INCLUDE directive was found, but the name of the file to include is missing. Action: Supply the name of the file to be included. U1033 syntax error : 'string' unexpected Explanation: The specified string is not part of the valid syntax for a makefile. Action: Correct the line according to the proper syntax. U1034 syntax error : separator missing Explanation: The colon that separates targets from dependents is missing. Action: Insert a colon after the target list. L1035 syntax error : expected ':' or '=' separator Explanation: Either a colon, implying a dependency line, or an = sign, implying a macro definition, was expected. Action: Insert the proper separator in the line. U1036 syntax error : too many names to left of '=' Explanation: Only one string is allowed to the left of a macro definition. Action: Remove the incorrect text before the = sign. U1037 syntax error : target name missing Explanation: A colon (:) was found before a target name was found. At least one target is required. Action: Insert the correct target name before the colon. U1038 internal error : lexer Explanation: The lexer encountered an unexpected condition. Action: Note the circumstances of the failure and contact IBM Support. U1039 internal error : parser Explanation: The parser encountered an unexpected condition. Action: Note the circumstances of the failure and contact IBM Support. U1040 internal error : macro expansion Explanation: An unexpected condition was found during macro expansion. Action: Note the circumstances of the failure and contact IBM Support. U1041 internal error : target building Explanation: An unexpected condition was found during target building. Action: Note the circumstances of the failure and contact IBM Support. U1042 internal error : expression stack overflow Explanation: An expression was too complex to decode using internal memory space. Action: Note the circumstances of the failure and contact IBM Support. U1043 internal error : temp file limit exceeded Explanation: NMAKE required too many temporary files. Action: Note the circumstances of the failure and contact IBM Support. U1044 internal error : too many levels of recursion building a target Explanation: Recursive invocations of NMAKE exceeded available memory. Action: Note the circumstances of the failure and contact IBM Support. U1045 messagetext Explanation: NMAKE encountered an unexpected condition. Action: Note the text of the message and contact IBM Support. U1046 internal error : out of search handles Explanation: NMAKE exceeded an internal limit on handles. Action: Note the circumstances of the failure and contact IBM Support. U1049 macro too long (max allowed size : 64K) Explanation: One of your macros expanded to longer than 65 535 bytes. Action: Recode the macro definition so that it is less than 64K. U1050 user-specified text Explanation: The message specified with the !ERROR directive is displayed. Action: Action depends on the defined error condition. U1051 out of memory Explanation: NMAKE ran out of space in the far heap. Action: Note the circumstances of the failure and contact IBM Support. U1052 file 'filename' not found Explanation: The file was not found. Action: Specify the filename properly in the makefile. U1053 file 'filename' unreadable Explanation: The filename cannot be read. Action: Be sure that the file has the appropriate attributes to be read. U1054 cannot create in-line file 'filename' Explanation: The program was unable to generate the specified in-line file as a uniquely-named temporary file. Action: Be sure your file system has enough space for temporary files. U1055 out of environment space Explanation: The environment space limit was reached. Action: Restart NMAKE with a larger environment space. U1056 cannot find command processor Explanation: The command processor CMD.EXE could not be found. Action: Be sure that the COMSPEC environment variable points to a command processor on your file system. U1057 cannot delete temporary file 'filename' Explanation: The program was unable to delete the specified file. Action: The file needs to exist and have the write attribute. U1058 terminated by user Explanation: You pressed Ctrl+Break to stop NMAKE. Action: None, the program has stopped. U1060 unable to close file : 'filename' Explanation: NMAKE was unable to close filename. Action: Look for the named file with write attribute on your file system. U1061 /F option requires a file name Explanation: You coded command-line option /f but failed to follow it with the name of a description file. Action: Specify the description file name after the option. U1062 missing file name with /X option Explanation: You coded command-line option /x but failed to follow it with the name of a file to receive redirected stderr output. Action: Give an output error file name after the option. U1063 missing macro name before '=' Explanation: You coded '=' in a command line macro definition, but failed to supply the name of the macro. Action: Give the macro name in the definition. U1064 MAKEFILE not found and no target specified Explanation: You invoked NMAKE without a /f option, and no file named MAKEFILE was present. Action: Either create a file named MAKEFILE, or use the /f switch. U1065 incorrect option 'option' Explanation: NMAKE does not use the option which you specified. Action: Use a valid command line option. U1070 cycle in macro definition 'macroname' Explanation: A cycle was detected in the macro definition specified. Action: Rewrite the macro to avoid the circular definition. U1071 cycle in dependency tree for target 'targetname' Explanation: A cycle was detected in the target dependency tree. Action: Check the dependency lists descending from the given target and remove the circular dependency. U1072 cycle in include files : 'filenames' Explanation: A cycle was detected in the tree of included files. Action: Check the file names included by the given include file and remove the circular inclusion. U1073 don't know how to make 'filename' Explanation: The specified target does not exist and there are no commands to execute or inference rules given for it. Hence NMAKE cannot build it. Action: Correct the specification of the file, which should exist on your file system. U1076 name too long Explanation: The macro name, target name, or build command name would overflow an internal buffer. Action: Reduce the length of the specified name. U1077 'program' : return code 'value' Explanation: The invocation of NMAKE failed with a nonzero return value. Action: Determine the cause of failure of the specified program. U1078 constant overflow at 'directive' Explanation: A constant in 'directive' expression was too big. Action: Reduce the size of the specified constant to a value within the range of a signed long integer, -2147483648 <= value <= 2147483647. U1079 illegal expression : divide by zero present Explanation: An expression contains a division by zero. Action: Remove the undefined division by zero from the expression. U1080 operator and/or operand out of place : usage illegal Explanation: The expression uses an operand or operator incorrectly. Action: Check the allowed set of operators and their precedence. U1081 'program' : program not found Explanation: NMAKE could not find the external command or program. Action: Be sure that the program is located in the PATH. U1082 'command' : cannot execute command: out of memory Explanation: NMAKE ran out of memory while running command. Action: Make more memory available while running NMAKE. U1083 target macro 'macroname' expands to nothing Explanation: The expansion of the given macro is a null string. Action: Correct the definition of the macro. U1084 cannot create temporary file 'filename' Explanation: NMAKE was unable to open the specified temporary file. Action: Check the filename specification for validity. U1085 cannot mix implicit and explicit rules Explanation: A regular target was specified along with the target for a rule (which has the form .sufx1.sufx2). Action: Separate targets built by implicit and explicit inference rules into different lists. U1086 inference rule cannot have dependents Explanation: Dependents are not allowed in the definition of an inference rule. Action: Remove the dependents list from the rule. U1087 cannot have : and :: dependents for same target Explanation: A target cannot have both a single-colon and double-colon dependency. Action: Choose either single-colon or double-colon separator for the target. U1088 invalid separator on inference rule : '::' Explanation: Inference rules can use only a single-colon separator. Action: Use a single-colon dependency for the target. U1089 cannot have build commands for pseudotarget 'targetname' Explanation: Pseudotargets (for example, .PRECIOUS, .SUFFIXES) cannot have build commands specified. Action: Remove the build commands from the specification of targetname. U1090 cannot have dependents for pseudotarget 'targetname' Explanation: The specified pseudotarget, for example, .SILENT, .IGNORE) cannot have a dependent. Action: Remove the dependent from the specification of targetname. U1092 too many names in rule Explanation: The rules cannot have more than one pair of extensions (ext1.ext2) as a target for the rule. Action: Use only one pair of extensions in any inference rule. U1093 cannot mix special pseudotargets Explanation: It is illegal to list two or more pseudotargets together. Action: Use only one pseudotarget in any list. U1094 syntax error : only [no]keep allowed here Explanation: In a context where only KEEP or NOKEEP is accepted to indicate the desired disposition of the inline file, you used an incorrect string. Action: Use the correct syntax for In-Line Files. U1095 expanded command line 'string' too long Explanation: After macro expansion, the command line length exceeds 1024 bytes. Action: Rewrite the command line to stay within a 1024-byte limit. U1097 extmake syntax usage error, no dependent Explanation: You used the extmake file syntax on a description block which had no dependent files. Action: Specify one or more dependent files for the block. U1098 extmake syntax in 'string' incorrect Explanation: The given string contains an extmake syntax error. Action: Correct the string according to the proper syntax. ═══ 22.3.2. Warnings (Part 2) 4001 - 4008 ═══ U4001 command file can be invoked only from command line Explanation: You used an @ symbol on an argument in a command file. You cannot invoke another command file from within a command file. Action: If the you want '@' to be part of an argument in a command file, you must enclose that argument in quotation marks. U4002 no match found for wild card 'string' Explanation: NMAKE expanded wildcards in the given string, but found no files matching the specification. Action: Check the existence of desired files on your file system. U4004 too many rules for target 'targetname' Explanation: You specified too many inference rules for the specified targetname. Action: Revise your rules specification for targetname. U4005 ignoring rule 'string' (extension not in .SUFFIXES) Explanation: You specified an inference rule with a suffix which was not in the .SUFFIXES list. Action: To use the suffix, be sure to include it in the .SUFFIXES list. U4006 special macro undefined : 'macroname' Explanation: You specified the undefined macro macroname. Action: NMAKE will ignore the undefined macroname. You may use only predefined special macros. U4007 file name 'filename' too long; truncating to 8.3 Explanation: The specified filename is too long for a FAT file system name. Action: NMAKE will shorten the filename to at most an eight-character name and 3-character extension. U4008 removed target 'filename' Explanation: While deleting non-precious files, NMAKE erased the specified filename which was a target. Action: Check your lists of targets and dependent files to be sure that filename is not needed. ═══ 22.3.3. Informational Messages (Part 3) 2-6 ═══ Message 2 'filename' is up-to-date. Explanation: The specified target filename is no older than any of its dependent files. Action: NMAKE does not need to rebuild this target. Message 3 **'file1' newer than 'file2' Explanation: While reporting creation times of files, NMAKE notes that file1 was created after file2. Action: [none] Message 5 touch 'filename' Explanation: You specified option /t to touch targets with the current date and time. Action: NMAKE has updated the creation time of filename. Message 6 'filename' target does not exist Explanation: The specified filename could not be found. Action: NMAKE will rebuild the target. ═══ 23. Glossary ═══ This glossary defines many of the terms used in this book. It includes terms and definitions from the IBM Dictionary of Computing, as well as terms specific to the OS/2 operating system and the Presentation Manager. It is not a complete glossary for the entire OS/2 operating system; nor is it a complete dictionary of computer terms. Other primary sources for these definitions are: o The American National Standard Dictionary for Information Systems, ANSI X3.172-1990, copyrighted 1990 by the American National Standards Institute, 11 West 42nd Street, New York, New York 10036. These definitions are identified by the symbol (A) after the definition. o The Information Technology Vocabulary, developed by Subcommittee 1, Joint Technical Committee 1, of the International Organization for Standardization and the International Electrotechnical Commission (ISO/IEC JTC1/SC1). Definitions of published parts of this vocabulary are identified by the symbol (I) after the definition; definitions taken from draft international standards, committee drafts, and working papers being developed by ISO/IEC JTC1/SC1 are identified by the symbol (T) after the definition, indicating that final agreement has not yet been reached among the participating National Bodies of SC1. ═══ 23.1. Glossary Listing ═══ Select a starting letter of glossary terms: A N B O C P D Q E R F S G T H U I V J W K X L Y M Z ═══ Glossary - A ═══ accelerator -In SAA Common User Access architecture, a key or combination of keys that invokes an application-defined function. accelerator table -A table used to define which key strokes are treated as accelerators and the commands they are translated into. access mode -The manner in which an application gains access to a file it has opened. Examples of access modes are read-only, write-only, and read/write. access permission -All access rights that a user has regarding an object. (I) action -One of a set of defined tasks that a computer performs. Users request the application to perform an action in several ways, such as typing a command, pressing a function key, or selecting the action name from an action bar or menu. action bar -In SAA Common User Access architecture, the area at the top of a window that contains choices that give a user access to actions available in that window. action point -The current position on the screen at which the pointer is pointing. Contrast with hot spot and input focus. active program -A program currently running on the computer. An active program can be interactive (running and receiving input from the user) or noninteractive (running but not receiving input from the user). See also interactive program and noninteractive program. active window -The window with which the user is currently interacting. address space -(1) The range of addresses available to a program. (A) (2) The area of virtual storage available for a particular job. alphanumeric video output -Output to the logical video buffer when the video adapter is in text mode and the logical video buffer is addressed by an application as a rectangular array of character cells. American National Standard Code for Information Interchange -The standard code, using a coded character set consisting of 7-bit coded characters (8 bits including parity check), that is used for information interchange among data processing systems, data communication systems, and associated equipment. The ASCII set consists of control characters and graphic characters. (A) Note: IBM has defined an extension to ASCII code (characters 128-255). anchor -A window procedure that handles Presentation Manager* message conversions between an icon procedure and an application. anchor block -An area of Presentation-Manager-internal resources to allocated process or thread that calls WinInitialize. anchor point -A point in a window used by a program designer or by a window manager to position a subsequently appearing window. ANSI -American National Standards Institute. APA -All points addressable. API -Application programming interface. application -A collection of software components used to perform specific types of work on a computer; for example, a payroll application, an airline reservation application, a network application. application object -In SAA Advanced Common User Access architecture, a form that an application provides for a user; for example, a spreadsheet form. Contrast with user object. application programming interface (API) -A functional interface supplied by the operating system or by a separately orderable licensed program that allows an application program written in a high-level language to use specific data or functions of the operating system or the licensed program. application-modal -Pertaining to a message box or dialog box for which processing must be completed before further interaction with any other window owned by the same application may take place. area -In computer graphics, a filled shape such as a solid rectangle. ASCII -American National Standard Code for Information Interchange. ASCIIZ -A string of ASCII characters that is terminated with a byte containing the value 0. aspect ratio -In computer graphics, the width-to-height ratio of an area, symbol, or shape. asynchronous (ASYNC) -(1) Pertaining to two or more processes that do not depend upon the occurrence of specific events such as common timing signals. (T) (2) Without regular time relationship; unexpected or unpredictable with respect to the execution of program instructions. See also synchronous. atom -A constant that represents a string. As soon as a string has been defined as an atom, the atom can be used in place of the string to save space. Strings are associated with their respective atoms in an atom table. See also integer atom. atom table -A table used to relate atoms with the strings that they represent. Also in the table is the mechanism by which the presence of a string can be checked. atomic operation -An operation that completes its work on an object before another operation can be performed on the same object. attribute -A characteristic or property that can be controlled, usually to obtain a required appearance; for example, the color of a line. See also graphics attributes and segment attributes. automatic link -In Information Presentation Facility (IPF), a link that begins a chain reaction at the primary window. When the user selects the primary window, an automatic link is activated to display secondary windows. AVIO -Advanced Video Input/Output. ═══ Glossary - B ═══ BВzier curve -(1) A mathematical technique of specifying smooth continous lines and surfaces, which require a starting point and a finishing point with several intermediate points that influence or control the path of the linking curve. Named after Dr. P. BВzier. (2) (D of C) In the AIX Graphics Library, a cubic spline approximation to a set of four control points that passes through the first and fourth control points and that has a continuous slope where two spline segments meet. Named after Dr. P. BВzier. background -(1) In multiprogramming, the conditions under which low-priority programs are executed. Contrast with foreground. (2) An active session that is not currently displayed on the screen. background color -The color in which the background of a graphic primitive is drawn. background mix -An attribute that determines how the background of a graphic primitive is combined with the existing color of the graphics presentation space. Contrast with mix. background program -In multiprogramming, a program that executes with a low priority. Contrast with foreground program. bit map -A representation in memory of the data displayed on an APA device, usually the screen. block -(1) A string of data elements recorded or transmitted as a unit. The elements may be characters, words, or logical records. (T) (2) To record data in a block. (3) A collection of contiguous records recorded as a unit. Blocks are separated by interblock gaps and each block may contain one or more records. (A) block device -A storage device that performs I/O operations on blocks of data called sectors. Data on block devices can be randomly accessed. Block devices are designated by a drive letter (for example, C:). blocking mode -A condition set by an application that determines when its threads might block. For example, an application might set the Pipemode parameter for the DosCreateNPipe function so that its threads perform I/O operations to the named pipe block when no data is available. border -A visual indication (for example, a separator line or a background color) of the boundaries of a window. boundary determination -An operation used to compute the size of the smallest rectangle that encloses a graphics object on the screen. breakpoint -(1) A point in a computer program where execution may be halted. A breakpoint is usually at the beginning of an instruction where halts, caused by external intervention, are convenient for resuming execution. (T) (2) A place in a program, specified by a command or a condition, where the system halts execution and gives control to the workstation user or to a specified program. broken pipe -When all of the handles that access one end of a pipe have been closed. bucket -One or more fields in which the result of an operation is kept. buffer -(1) A portion of storage used to hold input or output data temporarily. (2) To allocate and schedule the use of buffers. (A) button -A mechanism used to request or initiate an action. See also barrel buttons, bezel buttons, mouse button, push button, and radio button. byte pipe -Pipes that handle data as byte streams. All unnamed pipes are byte pipes. Named pipes can be byte pipes or message pipes. See byte stream. byte stream -Data that consists of an unbroken stream of bytes. ═══ Glossary - C ═══ cache -A high-speed buffer storage that contains frequently accessed instructions and data; it is used to reduce access time. cached micro presentation space -A presentation space from a Presentation-Manager-owned store of micro presentation spaces. It can be used for drawing to a window only, and must be returned to the store when the task is complete. CAD -Computer-Aided Design. call -(1) The action of bringing a computer program, a routine, or a subroutine into effect, usually by specifying the entry conditions and jumping to an entry point. (I) (A) (2) To transfer control to a procedure, program, routine, or subroutine. calling sequence -A sequence of instructions together with any associated data necessary to execute a call. (T) Cancel -An action that removes the current window or menu without processing it, and returns the previous window. cascaded menu -In the OS/2 operating system, a menu that appears when the arrow to the right of a cascading choice is selected. It contains a set of choices that are related to the cascading choice. Cascaded menus are used to reduce the length of a menu. See also cascading choice. cascading choice -In SAA Common User Access architecture, a choice in a menu that, when selected, produces a cascaded menu containing other choices. An arrow () appears to the right of the cascading choice. CASE statement -In PM programming, provides the body of a window procedure. There is usually one CASE statement for each message type supported by an application. CGA -Color graphics adapter. chained list -A list in which the data elements may be dispersed but in which each data element contains information for locating the next. (T)Synonymous with linked list. character -A letter, digit, or other symbol. character box -In computer graphics, the boundary that defines, in world coordinates, the horizontal and vertical space occupied by a single character from a character set. See also character mode. Contrast with character cell. character cell -The physical, rectangular space in which any single character is displayed on a screen or printer device. Position is addressed by row and column coordinates. Contrast with character box. character code -The means of addressing a character in a character set, sometimes called code point. character device -A device that performs I/O operations on one character at a time. Because character devices view data as a stream of bytes, character-device data cannot be randomly accessed. Character devices include the keyboard, mouse, and printer, and are referred to by name. character mode -A mode that, in conjunction with the font type, determines the extent to which graphics characters are affected by the character box, shear, and angle attributes. character set -(1) An ordered set of unique representations called characters; for example, the 26 letters of English alphabet, Boolean 0 and 1, the set of symbols in the Morse code, and the 128 ASCII characters. (A) (2) All the valid characters for a programming language or for a computer system. (3) A group of characters used for a specific reason; for example, the set of characters a printer can print. check box -In SAA Advanced Common User Access architecture, a square box with associated text that represents a choice. When a user selects a choice, an X appears in the check box to indicate that the choice is in effect. The user can clear the check box by selecting the choice again. Contrast with radio button. check mark - (1) (D of C) In SAA Advanced Common User Access architecture, a symbol that shows that a choice is currently in effect. (2) The symbol that is used to indicate a selected item on a pull-down menu. child process -In the OS/2 operating system, a process started by another process, which is called the parent process. Contrast with parent process. child window -A window that appears within the border of its parent window (either a primary window or another child window). When the parent window is resized, moved, or destroyed, the child window also is resized, moved, or destroyed; however, the child window can be moved or resized independently from the parent window, within the boundaries of the parent window. Contrast with parent window. choice -(1) An option that can be selected. The choice can be presented as text, as a symbol (number or letter), or as an icon (a pictorial symbol). (2) (D of C) In SAA Common User Access architecture, an item that a user can select. chord -(1) To press more than one button on a pointing device while the pointer is within the limits that the user has specified for the operating environment. (2) (D of C) In graphics, a short line segment whose end points lie on a circle. Chords are a means for producing a circular image from straight lines. The higher the number of chords per circle, the smoother the circular image. class -In object-oriented design or programming, a group of objects that share a common definition and that therefore share common properties, operations, and behavior. Members of the group are called instances of the class. class method -In System Object Model, an action that can be performed on a class object. Synonymous with factory method. class object -In System Object Model, the run-time implementation of a class. class style -The set of properties that apply to every window in a window class. client -(1) A functional unit that receives shared services from a server. (T) (2) A user, as in a client process that uses a named pipe or queue that is created and owned by a server process. client area -The part of the window, inside the border, that is below the menu bar. It is the user's work space, where a user types information and selects choices from selection fields. In primary windows, it is where an application programmer presents the objects that a user works on. client program -An application that creates and manipulates instances of classes. client window -The window in which the application displays output and receives input. This window is located inside the frame window, under the window title bar and any menu bar, and within any scroll bars. clip limits -The area of the paper that can be reached by a printer or plotter. clipboard -In SAA Common User Access architecture, an area of computer memory, or storage, that temporarily holds data. Data in the clipboard is available to other applications. clipping -In computer graphics, removing those parts of a display image that lie outside a given boundary. (I) (A) clipping area -The area in which the window can paint. clipping path -A clipping boundary in world-coordinate space. clock tick -The minimum unit of time that the system tracks. If the system timer currently counts at a rate of X Hz, the system tracks the time every 1/X of a second. Also known as time tick. CLOCK$ -Character-device name reserved for the system clock. code page -An assignment of graphic characters and control-function meanings to all code points. code point -(1) Synonym for character code. (2) (D of C) A 1-byte code representing one of 256 potential characters. code segment -An executable section of programming code within a load module. color dithering -See dithering. color graphics adapter (CGA) -An adapter that simultaneously provides four colors and is supported by all IBM Personal Computer and Personal System/2 models. command -The name and parameters associated with an action that a program can perform. command area -An area composed of a command field prompt and a command entry field. command entry field -An entry field in which users type commands. command line -On a display screen, a display line, sometimes at the bottom of the screen, in which only commands can be entered. command mode -A state of a system or device in which the user can enter commands. command prompt -A field prompt showing the location of the command entry field in a panel. Common Programming Interface (CPI) -Definitions of those application development languages and services that have, or are intended to have, implementations on and a high degree of commonality across the SAA environments. One of the three SAA architectural areas. See also Common User Access architecture. Common User Access (CUA) architecture - Guidelines for the dialog between a human and a workstation or terminal. One of the three SAA architectural areas. See also Common Programming Interface. compile -To translate a program written in a higher-level programming language into a machine language program. composite window -A window composed of other windows (such as a frame window, frame-control windows, and a client window) that are kept together as a unit and that interact with each other. computer-aided design (CAD) -The use of a computer to design or change a product, tool, or machine, such as using a computer for drafting or illustrating. COM1, COM2, COM3 -Character-device names reserved for serial ports 1 through 3. CON -Character-device name reserved for the console keyboard and screen. conditional cascaded menu -A pull-down menu associated with a menu item that has a cascade mini-push button beside it in an object's pop-up menu. The conditional cascaded menu is displayed when the user selects the mini-push button. container -In SAA Common User Access architecture, an object that holds other objects. A folder is an example of a container object. See also folder and object. contextual help -In SAA Common User Access Architecture, help that gives specific information about the item the cursor is on. The help is contextual because it provides information about a specific item as it is currently being used. Contrast with extended help. contiguous -Touching or joining at a common edge or boundary, for example, an unbroken consecutive series of storage locations. control -In SAA Advanced Common User Access architecture, a component of the user interface that allows a user to select choices or type information; for example, a check box, an entry field, a radio button. control area -A storage area used by a computer program to hold control information. (I) (A) Control Panel -In the Presentation Manager, a program used to set up user preferences that act globally across the system. Control Program -(1) The basic functions of the operating system, including DOS emulation and the support for keyboard, mouse, and video input/output. (2) A computer program designed to schedule and to supervise the execution of programs of a computer system. (I) (A) control window -A window that is used as part of a composite window to perform simple input and output tasks. Radio buttons and check boxes are examples. control word -An instruction within a document that identifies its parts or indicates how to format the document. coordinate space -A two-dimensional set of points used to generate output on a video display of printer. Copy -A choice that places onto the clipboard, a copy of what the user has selected. See also Cut and Paste. correlation -The action of determining which element or object within a picture is at a given position on the display. This follows a pick operation. coverpage window -A window in which the application's help information is displayed. CPI -Common Programming Interface. critical extended attribute -An extended attribute that is necessary for the correct operation of the system or a particular application. critical section -(1) In programming languages, a part of an asynchronous procedure that cannot be executed simultaneously with a certain part of another asynchronous procedure. (I) Note: Part of the other asynchronous procedure also is a critical section. (2) A section of code that is not reentrant; that is, code that can be executed by only one thread at a time. CUA architecture -Common User Access architecture. current position -In computer graphics, the position, in user coordinates, that becomes the starting point for the next graphics routine, if that routine does not explicitly specify a starting point. cursor -A symbol displayed on the screen and associated with an input device. The cursor indicates where input from the device will be placed. Types of cursors include text cursors, graphics cursors, and selection cursors. Contrast with pointer and input focus. Cut -In SAA Common User Access architecture, a choice that removes a selected object, or a part of an object, to the clipboard, usually compressing the space it occupied in a window. See also Copy and Paste. ═══ Glossary - D ═══ daisy chain -A method of device interconnection for determining interrupt priority by connecting the interrupt sources serially. data segment -A nonexecutable section of a program module; that is, a section of a program that contains data definitions. data structure -The syntactic structure of symbolic expressions and their storage-allocation characteristics. (T) data transfer -The movement of data from one object to another by way of the clipboard or by direct manipulation. DBCS -Double-byte character set. DDE -Dynamic data exchange. deadlock -(1) Unresolved contention for the use of a resource. (2) An error condition in which processing cannot continue because each of two elements of the process is waiting for an action by, or a response from, the other. (3) An impasse that occurs when multiple processes are waiting for the availability of a resource that will not become available because it is being held by another process that is in a similar wait state. debug -To detect, diagnose, and eliminate errors in programs. (T) decipoint -In printing, one tenth of a point. There are 72 points in an inch. default procedure -A function provided by the Presentation Manager Interface that may be used to process standard messages from dialogs or windows. default value -A value assumed when no value has been specified. Synonymous with assumed value. For example, in the graphics programming interface, the default line-type is `solid'. definition list -A type of list that pairs a term and its description. delta -An application-defined threshold, or number of container items, from either end of the list. descendant -See child process. descriptive text -Text used in addition to a field prompt to give more information about a field. Deselect all -A choice that cancels the selection of all of the objects that have been selected in that window. Desktop Manager -In the Presentation Manager, a window that displays a list of groups of programs, each of which can be started or stopped. desktop window -The window, corresponding to the physical device, against which all other types of windows are established. detached process -A background process that runs independent of the parent process. detent -A point on a slider that represents an exact value to which a user can move the slider arm. device context -A logical description of a data destination such as memory, metafile, display, printer, or plotter. See also direct device context, information device context, memory device context, metafile device context, queued device context, and screen device context. device driver -A file that contains the code needed to attach and use a device such as a display, printer, or plotter. device space -(1) Coordinate space in which graphics are assembled after all GPI transformations have been applied. Device space is defined in device-specific units. (2) (D of C) In computer graphics, a space defined by the complete set of addressable points of a display device. (A) dialog -The interchange of information between a computer and its user through a sequence of requests by the user and the presentation of responses by the computer. dialog box -In SAA Advanced Common User Access architecture, a movable window, fixed in size, containing controls that a user uses to provide information required by an application so that it can continue to process a user request. See also message box, primary window, secondary window. Also known as a pop-up window. Dialog Box Editor -A WYSIWYG editor that creates dialog boxes for communicating with the application user. dialog item -A component (for example, a menu or a button) of a dialog box. Dialog items are also used when creating dialog templates. dialog procedure -A dialog window that is controlled by a window procedure. It is responsible for responding to all messages sent to the dialog window. dialog tag language -A markup language used by the DTL compiler to create dialog objects. dialog template -The definition of a dialog box, which contains details of its position, appearance, and window ID, and the window ID of each of its child windows. direct device context -A logical description of a data destination that is a device other than the screen (for example, a printer or plotter), and where the output is not to go through the spooler. Its purpose is to satisfy queries. See also device context. direct manipulation -The user's ability to interact with an object by using the mouse, typically by dragging an object around on the Desktop and dropping it on other objects. direct memory access (DMA) -A technique for moving data directly between main storage and peripheral equipment without requiring processing of the data by the processing unit.(T) directory -A type of file containing the names and controlling information for other files or other directories. display point -Synonym for pel. dithering -(1) The process used in color displays whereby every other pel is set to one color, and the intermediate pels are set to another. Together they produce the effect of a third color at normal viewing distances. This process can only be used on solid areas of color; it does not work, for example, on narrow lines. (2) (D of C ) In computer graphics, a technique of interleaving dark and light pixels so that the resulting image looks smoothly shaded when viewed from a distance. DMA -Direct memory access. DOS Protect Mode Interface (DPMI) -An interface between protect mode and real mode programs. double-byte character set (DBCS) -A set of characters in which each character is represented by two bytes. Languages such as Japanese, Chinese, and Korean, which contain more characters than can be represented by 256 code points, require double-byte character sets. Since each character requires two bytes, the entering, displaying, and printing of DBCS characters requires hardware and software that can support DBCS. doubleword -A contiguous sequence of bits or characters that comprises two computer words and is capable of being addressed as a unit. (A) DPMI -DOS Protect Mode Interface. drag -In SAA Common User Access, to use a pointing device to move an object; for example, clicking on a window border, and dragging it to make the window larger. dragging -(1) In computer graphics, moving an object on the display screen as if it were attached to the pointer. (2) (D of C) In computer graphics, moving one or more segments on a display surface by translating. (I) (A) drawing chain -See segment chain. drop -To fix the position of an object that is being dragged, by releasing the select button of the pointing device. drop -To fix the position of an object that is being dragged, by releasing the select button of the pointing device. See also drag. DTL -Dialog tag language. dual-boot function -A feature of the OS/2 operating system that allows the user to start DOS from within the operating system, or an OS/2 session from within DOS. duplex -Pertaining to communication in which data can be sent and received at the same time. Synonymous with full duplex. dynamic data exchange (DDE) -A message protocol used to communicate between applications that share data. The protocol uses shared memory as the means of exchanging data between applications. dynamic data formatting -A formatting procedure that enables you to incorporate text, bit maps or metafiles in an IPF window at execution time. dynamic link library -A collection of executable programming code and data that is bound to an application at load time or run time, rather than during linking. The programming code and data in a dynamic link library can be shared by several applications simultaneously. dynamic linking -The process of resolving external references in a program module at load time or run time rather than during linking. dynamic segments -Graphics segments drawn in exclusive-OR mix mode so that they can be moved from one screen position to another without affecting the rest of the displayed picture. dynamic storage -(1) A device that stores data in a manner that permits the data to move or vary with time such that the specified data is not always available for recovery. (A) (2) A storage in which the cells require repetitive application of control signals in order to retain stored data. Such repetitive application of the control signals is called a refresh operation. A dynamic storage may use static addressing or sensing circuits. (A) (3) See also static storage. dynamic time slicing -Varies the size of the time slice depending on system load and paging activity. dynamic-link module -A module that is linked at load time or run time. ═══ Glossary - E ═══ EBCDIC -Extended binary-coded decimal interchange code. A coded character set consisting of 8-bit coded characters (9 bits including parity check), used for information interchange among data processing systems, data communications systems, and associated equipment. edge-triggered -Pertaining to an event semaphore that is posted then reset before a waiting thread gets a chance to run. The semaphore is considered to be posted for the rest of that thread's waiting period; the thread does not have to wait for the semaphore to be posted again. EGA -Extended graphics adapter. element -An entry in a graphics segment that comprises one or more graphics orders and that is addressed by the element pointer. EMS -Expanded Memory Specification. encapsulation -Hiding an object's implementation, that is, its private, internal data and methods. Private variables and methods are accessible only to the object that contains them. entry field -In SAA Common User Access architecture, an area where a user types information. Its boundaries are usually indicated. See also selection field. entry panel -A defined panel type containing one or more entry fields and protected information such as headings, prompts, and explanatory text. entry-field control -The component of a user interface that provides the means by which the application receives data entered by the user in an entry field. When it has the input focus, the entry field displays a flashing pointer at the position where the next typed character will go. environment segment -The list of environment variables and their values for a process. environment strings -ASCII text strings that define the value of environment variables. environment variables -Variables that describe the execution environment of a process. These variables are named by the operating system or by the application. Environment variables named by the operating system are PATH, DPATH, INCLUDE, INIT, LIB, PROMPT, and TEMP. The values of environment variables are defined by the user in the CONFIG.SYS file, or by using the SET command at the OS/2 command prompt. error message -An indication that an error has been detected. (A) event semaphore -A semaphore that enables a thread to signal a waiting thread or threads that an event has occurred or that a task has been completed. The waiting threads can then perform an action that is dependent on the completion of the signaled event. exception -An abnormal condition such as an I/O error encountered in processing a data set or a file. exclusive system semaphore -A system semaphore that can be modified only by threads within the same process. executable file -(1) A file that contains programs or commands that perform operations or actions to be taken. (2) A collection of related data records that execute programs. exit -To execute an instruction within a portion of a computer program in order to terminate the execution of that portion. Such portions of computer programs include loops, subroutines, modules, and so on. (T) Repeated exit requests return the user to the point from which all functions provided to the system are accessible. Contrast with cancel. expanded memory specification (EMS) -Enables DOS applications to access memory above the 1MB real mode addressing limit. extended attribute -An additional piece of information about a file object, such as its data format or category. It consists of a name and a value. A file object may have more than one extended attribute associated with it. extended help -In SAA Common User Access architecture, a help action that provides information about the contents of the application window from which a user requested help. Contrast with contextual help. extended-choice selection -A mode that allows the user to select more than one item from a window. Not all windows allow extended choice selection. Contrast with multiple-choice selection. extent -Continuous space on a disk or diskette that is occupied by or reserved for a particular data set, data space, or file. external link -In Information Presentation Facility, a link that connects external online document files. ═══ Glossary - F ═══ family-mode application -An application program that can run in the OS/2 environment and in the DOS environment; however, it cannot take advantage of many of the OS/2-mode facilities, such as multitasking, interprocess communication, and dynamic linking. FAT -File allocation table. FEA -Full extended attribute. field-level help -Information specific to the field on which the cursor is positioned. This help function is "contextual" because it provides information about a specific item as it is currently used; the information is dependent upon the context within the work session. FIFO -First-in-first-out. (A) file -A named set of records stored or processed as a unit. (T) file allocation table (FAT) -In IBM personal computers, a table used by the operating system to allocate space on a disk for a file, and to locate and chain together parts of the file that may be scattered on different sectors so that the file can be used in a random or sequential manner. file attribute -Any of the attributes that describe the characteristics of a file. File Manager -In the Presentation Manager, a program that displays directories and files, and allows various actions on them. file specification -The full identifier for a file, which includes its drive designation, path, file name, and extension. file system -The combination of software and hardware that supports storing information on a storage device. file system driver (FSD) -A program that manages file I\O and controls the format of information on the storage media. fillet -A curve that is tangential to the end points of two adjoining lines. See also polyfillet. filtering -An application process that changes the order of data in a queue. first-in-first-out (FIFO) -A queuing technique in which the next item to be retrieved is the item that has been in the queue for the longest time. (A) flag -(1) An indicator or parameter that shows the setting of a switch. (2) A character that signals the occurrence of some condition, such as the end of a word. (A) (3) (D of C) A characteristic of a file or directory that enables it to be used in certain ways. See also archive flag, hidden flag, and read-only flag. focus -See input focus. folder -A container used to organize objects. font -A particular size and style of typeface that contains definitions of character sets, marker sets, and pattern sets. Font Editor -A utility program provided with the IBM Developers Toolkit that enables the design and creation of new fonts. foreground program -(1) The program with which the user is currently interacting. Also known as interactive program. Contrast with background program. (2) (D of C) In multiprogramming, a high-priority program. frame -The part of a window that can contain several different visual elements specified by the application, but drawn and controlled by the Presentation Manager. The frame encloses the client area. frame styles -Standard window layouts provided by the Presentation Manager. FSD -File system driver. full-duplex -Synonym for duplex. full-screen application -An application that has complete control of the screen. function -(1) In a programming language, a block, with or without formal parameters, whose execution is invoked by means of a call. (2) A set of related control statements that cause one or more programs to be performed. function key -A key that causes a specified sequence of operations to be performed when it is pressed, for example, F1 and Alt-K. function key area -The area at the bottom of a window that contains function key assignments such as F1=Help. ═══ Glossary - G ═══ GDT -Global Descriptor Table. general protection fault -An exception condition that occurs when a process attempts to use storage or a module that has some level of protection assigned to it, such as I/O privilege level. See also IOPL code segment. Global Descriptor Table (GDT) -A table that defines code and data segments available to all tasks in an application. global dynamic-link module -A dynamic-link module that can be shared by all processes in the system that refer to the module name. global file-name character -Either a question mark (?) or an asterisk (*) used as a variable in a file name or file name extension when referring to a particular file or group of files. glyph -A graphic symbol whose appearance conveys information. GPI -Graphics programming interface. graphic primitive -In computer graphics, a basic element, such as an arc or a line, that is not made up of smaller parts and that is used to create diagrams and pictures. See also graphics segment. graphics -(1) A picture defined in terms of graphic primitives and graphics attributes. (2) (D of C) The making of charts and pictures. (3) Pertaining to charts, tables, and their creation. (4) See computer graphics, coordinate graphics, fixed-image graphics, interactive graphics, passive graphics, raster graphics. graphics attributes -Attributes that apply to graphic primitives. Examples are color, line type, and shading-pattern definition. See also segment attributes. graphics field -The clipping boundary that defines the visible part of the presentation-page contents. graphics mode -One of several states of a display. The mode determines the resolution and color content of the screen. graphics model space -The conceptual coordinate space in which a picture is constructed after any model transforms have been applied. Also known as model space. Graphics programming interface -The formally defined programming language that is between an IBM graphics program and the user of the program. graphics segment -A sequence of related graphic primitives and graphics attributes. See also graphic primitive. graying -The indication that a choice on a pull-down is unavailable. group -A collection of logically connected controls. For example, the buttons controlling paper size for a printer could be called a group. See also program group. ═══ Glossary - H ═══ handle -(1) An identifier that represents an object, such as a device or window, to the Presentation Interface. (2) (D of C) In the Advanced DOS and OS/2 operating systems, a binary value created by the system that identifies a drive, directory, and file so that the file can be found and opened. hard error -An error condition on a network that requires either that the system be reconfigured or that the source of the error be removed before the system can resume reliable operation. header -(1) System-defined control information that precedes user data. (2) The portion of a message that contains control information for the message, such as one or more destination fields, name of the originating station, input sequence number, character string indicating the type of message, and priority level for the message. heading tags -A document element that enables information to be displayed in windows, and that controls entries in the contents window controls placement of push buttons in a window, and defines the shape and size of windows. heap -An area of free storage available for dynamic allocation by an application. Its size varies according to the storage requirements of the application. help function -(1) A function that provides information about a specific field, an application panel, or information about the help facility. (2) (D of C) One or more display images that describe how to use application software or how to do a system operation. Help index -In SAA Common User Access architecture, a help action that provides an index of the help information available for an application. help panel -A panel with information to assist users that is displayed in response to a help request from the user. help window -A Common-User-Access-defined secondary window that displays information when the user requests help. hidden file -An operating system file that is not displayed by a directory listing. hide button -In the OS/2 operating system, a small, square button located in the right-hand corner of the title bar of a window that, when selected, removes from the screen all the windows associated with that window. Contrast with maximize button. See also restore button. hierarchical inheritance -The relationship between parent and child classes. An object that is lower in the inheritance hierarchy than another object, inherits all the characteristics and behaviors of the objects above it in the hierarchy. hierarchy -A tree of segments beginning with the root segment and proceeding downward to dependent segment types. high-performance file system (HPFS) -In the OS/2 operating system, an installable file system that uses high-speed buffer storage, known as a cache, to provide fast access to large disk volumes. The file system also supports the coexistence of multiple, active file systems on a single personal computer, with the capability of multiple and different storage devices. File names used with the HPFS can have as many as 254 characters. hit testing -The means of identifying which window is associated with which input device event. hook -A point in a system-defined function where an application can supply additional code that the system processes as though it were part of the function. hook chain -A sequence of hook procedures that are "chained" together so that each event is passed, in turn, to each procedure in the chain. hot spot -The part of the pointer that must touch an object before it can be selected. This is usually the tip of the pointer. Contrast with action point. HPFS -high-performance file system. hypergraphic link -A connection between one piece of information and another through the use of graphics. hypertext -A way of presenting information online with connections between one piece of information and another, called hypertext links. See also hypertext link. hypertext link -A connection between one piece of information and another. ═══ Glossary - I ═══ I/O operation -An input operation to, or output operation from a device attached to a computer. I-beam pointer -A pointer that indicates an area, such as an entry field in which text can be edited. icon -In SAA Advanced Common User Access architecture, a graphical representation of an object, consisting of an image, image background, and a label. Icons can represent items (such as a document file) that the user wants to work on, and actions that the user wants to perform. In the Presentation Manager, icons are used for data objects, system actions, and minimized programs. icon area -In the Presentation Manager, the area at the bottom of the screen that is normally used to display the icons for minimized programs. Icon Editor -The Presentation Manager-provided tool for creating icons. IDL -Interface Definition Language. image font -A set of symbols, each of which is described in a rectangular array of pels. Some of the pels in the array are set to produce the image of one of the symbols. Contrast with outline font. implied metaclass -Subclassing the metaclass of a parent class without a separate CSC for the resultant metaclass. indirect manipulation -Interaction with an object through choices and controls. information device context -A logical description of a data destination other than the screen (for example, a printer or plotter), but where no output will occur. Its purpose is to satisfy queries. See also device context. information panel -A defined panel type characterized by a body containing only protected information. Information Presentation Facility (IPF) -A facility provided by the OS/2 operating system, by which application developers can produce online documentation and context-sensitive online help panels for their applications. inheritance -The derivation of new (child) classes from existing (parent) classes. The new class inherits all the data and methods of the parent class without having to redefine them. input focus -(1) The area of a window where user interaction is possible using an input device, such as a mouse or the keyboard. (2) The position in the active window where a user's normal interaction with the keyboard will appear. input router -An internal OS/2 process that removes messages from the system queue. input/output control -A device-specific command that requests a function of a device driver. installable file system (IFS) -A file system in which software is installed when the operating system is started. instance -A single occurrence of an object class that has a particular behavior. instruction pointer -In system/38, a pointer that provides addressability for a machine interface instruction in a program. integer atom -An atom that represents a predefined system constant and carries no storage overhead. For example, names of window classes provided by Presentation Manager are expressed as integer atoms. interactive graphics -Graphics that can be moved or manipulated by a user at a terminal. interactive program -(1) A program that is running (active) and is ready to receive (or is receiving) input from a user. (2) A running program that can receive input from the keyboard or another input device. Compare with active program and contrast with noninteractive program. Also known as a foreground program. interchange file -A file containing data that can be sent from one Presentation Manager interface application to another. Interface Definition Language (IDL) -Language-neutral interface specification for a SOM class. interpreter -A program that translates and executes each instruction of a high-level programming language before it translates and executes. interprocess communication (IPC) -In the OS/2 operating system, the exchange of information between processes or threads through semaphores, pipes, queues, and shared memory. interval timer -(1) A timer that provides program interruptions on a program-controlled basis. (2) An electronic counter that counts intervals of time under program control. IOCtl -Input/output control. IOPL -Input/output privilege level. IOPL code segment -An IOPL executable section of programming code that enables an application to directly manipulate hardware interrupts and ports without replacing the device driver. See also privilege level. IPC -Interprocess communication. IPF -Information Presentation Facility. IPF compiler -A text compiler that interpret tags in a source file and converts the information into the specified format. IPF tag language -A markup language that provides the instructions for displaying online information. item -A data object that can be passed in a DDE transaction. ═══ Glossary - J ═══ journal -A special-purpose file that is used to record changes made in the system. ═══ Glossary - K ═══ Kanji -A graphic character set used in Japanese ideographic alphabets. KBD$ -Character-device name reserved for the keyboard. kernel -The part of an operating system that performs basic functions, such as allocating hardware resources. kerning -The design of graphics characters so that their character boxes overlap. Used to space text proportionally. keyboard accelerator -A keystroke that generates a command message for an application. keyboard augmentation -A function that enables a user to press a keyboard key while pressing a mouse button. keyboard focus -A temporary attribute of a window. The window that has a keyboard focus receives all keyboard input until the focus changes to a different window. Keys help -In SAA Common User Access architecture, a help action that provides a listing of the application keys and their assigned functions. ═══ Glossary - L ═══ label -In a graphics segment, an identifier of one or more elements that is used when editing the segment. LAN -local area network. language support procedure -A function provided by the Presentation Manager Interface for applications that do not, or cannot (as in the case of COBOL and FORTRAN programs), provide their own dialog or window procedures. lazy drag -See pickup and drop. lazy drag set -See pickup set. LDT -In the OS/2 operating system, Local Descriptor Table. LIFO stack -A stack from which data is retrieved in last-in, first-out order. linear address -A unique value that identifies the memory object. linked list -Synonym for chained list. list box -In SAA Advanced Common User Access architecture, a control that contains scrollable choices from which a user can select one choice. Note: In CUA architecture, this is a programmer term. The end user term is selection list. list button -A button labeled with an underlined down-arrow that presents a list of valid objects or choices that can be selected for that field. list panel -A defined panel type that displays a list of items from which users can select one or more choices and then specify one or more actions to work on those choices. load time -The point in time at which a program module is loaded into main storage for execution. load-on-call -A function of a linkage editor that allows selected segments of the module to be disk resident while other segments are executing. Disk resident segments are loaded for execution and given control when any entry point that they contain is called. local area network (LAN) -(1) A computer network located on a user's premises within a limited geographical area. Communication within a local area network is not subject to external regulations; however, communication across the LAN boundary may be subject to some form of regulation. (T) Note: A LAN does not use store and forward techniques. (2) A network inwhich a set of devices are connected to one another for communication and that can be connected to a larger network. Local Descriptor Table (LDT) -Defines code and data segments specific to a single task. lock -A serialization mechanism by means of which a resource is restricted for use by the holder of the lock. logical storage device -A device that the user can map to a physical (actual) device. LPT1, LPT2, LPT3 -Character-device names reserved for parallel printers 1 through 3. ═══ Glossary - M ═══ main window -The window that is positioned relative to the desktop window. manipulation button -The button on a pointing device a user presses to directly manipulate an object. map -(1) A set of values having a defined correspondence with the quantities or values of another set. (I) (A) (2) To establish a set of values having a defined correspondence with the quantities or values of another set. (I) marker box -In computer graphics, the boundary that defines, in world coordinates, the horizontal and vertical space occupied by a single marker from a marker set. marker symbol -A symbol centered on a point. Graphs and charts can use marker symbols to indicate the plotted points. marquee box -The rectangle that appears during a selection technique in which a user selects objects by drawing a box around them with a pointing device. Master Help Index -In the OS/2 operating system, an alphabetic list of help topics related to using the operating system. maximize -To enlarge a window to its largest possible size. media window -The part of the physical device (display, printer, or plotter) on which a picture is presented. memory block -Part memory within a heap. memory device context -A logical description of a data destination that is a memory bit map. See also device context. memory management -A feature of the operating system for allocating, sharing, and freeing main storage. memory object -Logical unit of memory requested by an application, which forms the granular unit of memory manipulation from the application viewpoint. menu -In SAA Advanced Common User Access architecture, an extension of the menu bar that displays a list of choices available for a selected choice in the menu bar. After a user selects a choice in menu bar, the corresponding menu appears. Additional pop-up windows can appear from menu choices. menu bar -In SAA Advanced Common User Access architecture, the area near the top of a window, below the title bar and above the rest of the window, that contains choices that provide access to other menus. menu button -The button on a pointing device that a user presses to view a pop-up menu associated with an object. message -(1) In the Presentation Manager, a packet of data used for communication between the Presentation Manager interface and Presentation Manager applications (2) In a user interface, information not requested by users but presented to users by the computer in response to a user action or internal process. message box -(1) A dialog window predefined by the system and used as a simple interface for applications, without the necessity of creating dialog-template resources or dialog procedures. (2) (D of C) In SAA Advanced Common User Access architecture, a type of window that shows messages to users. See also dialog box, primary window, secondary window. message filter -The means of selecting which messages from a specific window will be handled by the application. message queue -A sequenced collection of messages to be read by the application. message stream mode -A method of operation in which data is treated as a stream of messages. Contrast with byte stream. metacharacter -See global file-name character. metaclass -The conjunction of an object and its class information; that is, the information pertaining to the class as a whole, rather than to a single instance of the class. Each class is itself an object, which is an instance of the metaclass. metafile -A file containing a series of attributes that set color, shape and size, usually of a picture or a drawing. Using a program that can interpret these attributes, a user can view the assembled image. metafile device context -A logical description of a data destination that is a metafile, which is used for graphics interchange. See also device context. metalanguage -A language used to specify another language. For example, data types can be described using a metalanguage so as to make the descriptions independent of any one computer language. method -A function that defines a behavior for a class or object. method override -The replacement, by a child class, of the implementation of a method inherited from a parent and an ancestor class. mickey -A unit of measurement for physical mouse motion whose value depends on the mouse device driver currently loaded. micro presentation space -A graphics presentation space in which a restricted set of the GPI function calls is available. minimize -To remove from the screen all windows associated with an application and replace them with an icon that represents the application. mix -An attribute that determines how the foreground of a graphic primitive is combined with the existing color of graphics output. Also known as foreground mix. Contrast with background mix. mixed character string -A string containing a mixture of one-byte and Kanji or Hangeul (two-byte) characters. mnemonic -(1) A method of selecting an item on a pull-down by means of typing the highlighted letter in the menu item. (2) (D of C) In SAA Advanced Common User Access architecture, usually a single character, within the text of a choice, identified by an underscore beneath the character. If all characters in a choice already serve as mnemonics for other choices, another character, placed in parentheses immediately following the choice, can be used. When a user types the mnemonic for a choice, the choice is either selected or the cursor is moved to that choice. modal dialog box -In SAA Advanced Common User Access architecture, a type of movable window, fixed in size, that requires a user to enter information before continuing to work in the application window from which it was displayed. Contrast with modeless dialog box. Also known as a serial dialog box. Contrast with parallel dialog box. Note: In CUA architecture, this is a programmer term. The end user term is pop-up window. model space -See graphics model space. modeless dialog box -In SAA Advanced Common User Access architecture, a type of movable window, fixed in size, that allows users to continue their dialog with the application without entering information in the dialog box. Also known as a parallel dialog box. Contrast with modal dialog box. Note: In CUA architecture, this is a programmer term. The end user term is pop-up window. module definition file -A file that describes the code segments within a load module. For example, it indicates whether a code segment is loadable before module execution begins (preload), or loadable only when referred to at run time (load-on-call). mouse -In SAA usage, a device that a user moves on a flat surface to position a pointer on the screen. It allows a user to select a choice o function to be performed or to perform operations on the screen, such as dragging or drawing lines from one position to another. MOUSE$ -Character-device name reserved for a mouse. multiple-choice selection -In SAA Basic Common User Access architecture, a type of field from which a user can select one or more choices or select none. See also check box. Contrast with extended-choice selection. multiple-line entry field -In SAA Advanced Common User Access architecture, a control into which a user types more than one line of information. See also single-line entry field. multitasking -The concurrent processing of applications or parts of applications. A running application and its data are protected from other concurrently running applications. mutex semaphore -(Mutual exclusion semaphore). A semaphore that enables threads to serialize their access to resources. Only the thread that currently owns the mutex semaphore can gain access to the resource, thus preventing one thread from interrupting operations being performed by another. muxwait semaphore -(Multiple wait semaphore). A semaphore that enables a thread to wait either for multiple event semaphores to be posted or for multiple mutex semaphores to be released. Alternatively, a muxwait semaphore can be set to enable a thread to wait for any ONE of the event or mutex semaphores in the muxwait semaphore's list to be posted or released. ═══ Glossary - N ═══ named pipe -A named buffer that provides client-to-server, server-to-client, or full duplex communication between unrelated processes. Contrast with unnamed pipe. national language support (NLS) -The modification or conversion of a United States English product to conform to the requirements of another language or country. This can include the enabling or retrofitting of a product and the translation of nomenclature, MRI, or documentation of a product. nested list -A list that is contained within another list. NLS -national language support. non-8.3 file-name format -A file-naming convention in which file names can consist of up to 255 characters. See also 8.3 file-name format. noncritical extended attribute -An extended attribute that is not necessary for the function of an application. nondestructive read -Reading that does not erase the data in the source location. (T) noninteractive program -A running program that cannot receive input from the keyboard or other input device. Compare with active program, and contrast with interactive program. nonretained graphics -Graphic primitives that are not remembered by the Presentation Manager interface when they have been drawn. Contrast with retained graphics. null character (NUL) -(1) Character-device name reserved for a nonexistent (dummy) device. (2) (D of C) A control character that is used to accomplish media-fill or time-fill and that may be inserted into or removed from a sequence of characters without affecting the meaning of the sequence; however, the control of equipment or the format may be affected by this character. (I) (A) null-terminated string -A string of (n+1) characters where the (n+1)th character is the `null' character (0x00) Also known as `zero-terminated' string and 'ASCIIZ' string. ═══ Glossary - O ═══ object -A set of data and actions that can be performed on that data. Object Interface Definition Language (OIDL) -Specification language used in SOM Version 1 for defining classes. Replaced by Interface Definition Language (IDL). object window -A window that does not have a parent but which might have child windows. An object window cannot be presented on a device. OIDL -Object Interface Definition Language. open -To start working with a file, directory, or other object. ordered list -Vertical arrangements of items, with each item in the list preceded by a number or letter. outline font -A set of symbols, each of which is created as a series of lines and curves. Synonymous with vector font. Contrast with image font. output area -An area of storage reserved for output. (A) owner window -A window into which specific events that occur in another (owned) window are reported. ownership -The determination of how windows communicate using messages. owning process -The process that owns the resources that might be shared with other processes. ═══ Glossary - P ═══ page -(1) A 4KB segment of contiguous physical memory. (2) (D of C) A defined unit of space on a storage medium. page viewport -A boundary in device coordinates that defines the area of the output device in which graphics are to be displayed. The presentation-page contents are transformed automatically to the page viewport in device space. paint -(1) The action of drawing or redrawing the contents of a window. (2) In computer graphics, to shade an area of a display image; for example, with crosshatching or color. panel -In SAA Basic Common User Access architecture, a particular arrangement of information that is presented in a window or pop-up. If some of the information is not visible, a user can scroll through the information. panel area -An area within a panel that contains related information. The three major Common User Access-defined panel areas are the action bar, the function key area, and the panel body. panel area separator -In SAA Basic Common User Access architecture, a solid, dashed, or blank line that provides a visual distinction between two adjacent areas of a panel. panel body -The portion of a panel not occupied by the action bar, function key area, title or scroll bars. The panel body can contain protected information, selection fields, and entry fields. The layout and content of the panel body determine the panel type. panel body area -See client area. panel definition -A description of the contents and characteristics of a panel. A panel definition is the application developer's mechanism for predefining the format to be presented to users in a window. panel ID -In SAA Basic Common User Access architecture, a panel identifier, located in the upper-left corner of a panel. A user can choose whether to display the panel ID. panel title -In SAA Basic Common User Access architecture, a particular arrangement of information that is presented in a window or pop-up. If some of the information is not visible, a user can scroll through the information. paper size -The size of paper, defined in either standard U.S. or European names (for example, A, B, A4), and measured in inches or millimeters respectively. parallel dialog box -See modeless dialog box. parameter list -A list of values that provides a means of associating addressability of data defined in a called program with data in the calling program. It contains parameter names and the order in which they are to be associated in the calling and called program. parent process -In the OS/2 operating system, a process that creates other processes. Contrast with child process. parent window -In the OS/2 operating system, a window that creates a child window. The child window is drawn within the parent window. If the parent window is moved, resized, or destroyed, the child window also will be moved, resized, or destroyed. However, the child window can be moved and resized independently from the parent window, within the boundaries of the parent window. Contrast with child window. partition -(1) A fixed-size division of storage. (2) On an IBM personal computer fixed disk, one of four possible storage areas of variable size; one may be accessed by DOS, and each of the others may be assigned to another operating system. Paste -A choice in the Edit pull-down that a user selects to move the contents of the clipboard into a preselected location. See also Copy and Cut. path -The route used to locate files; the storage location of a file. A fully qualified path lists the drive identifier, directory name, subdirectory name (if any), and file name with the associated extension. PDD -Physical device driver. peeking -An action taken by any thread in the process that owns the queue to examine queue elements without removing them. pel -(1) The smallest area of a display screen capable of being addressed and switched between visible and invisible states. Synonym for display point, pixel, and picture element. (2) (D of C) Picture element. persistent object -An object whose instance data and state are preserved between system shutdown and system startup. physical device driver (PDD) -A system interface that handles hardware interrupts and supports a set of input and output functions. pick -To select part of a displayed object using the pointer. pickup -To add an object or set of objects to the pickup set. pickup and drop -A drag operation that does not require the direct manipulation button to be pressed for the duration of the drag. pickup set -The set of objects that have been picked up as part of a pickup and drop operation. picture chain -See segment chain. picture element -(1) Synonym for pel. (2) (D of C) In computer graphics, the smallest element of a display surface that can be independently assigned color and intensity. (T) . (3) The area of the finest detail that can be reproduced effectively on the recording medium. PID -Process identification. pipe -(1) A named or unnamed buffer used to pass data between processes. A process reads from or writes to a pipe as if the pipe were a standard-input or standard-output file. See also named pipe and unnamed pipe. (2) (D of C) To direct data so that the output from one process becomes the input to another process. The standard output of one command can be connected to the standard input of another with the pipe operator (|). pixel -(1) Synonym for pel. (2) (D of C) Picture element. plotter -An output unit that directly produces a hardcopy record of data on a removable medium, in the form of a two-dimensional graphic representation. (T) PM -Presentation Manager. pointer -(1) The symbol displayed on the screen that is moved by a pointing device, such as a mouse. The pointer is used to point at items that users can select. Contrast with cursor. (2) A data element that indicates the location of another data element. (T) POINTER$ -Character-device name reserved for a pointer device (mouse screen support). pointing device -In SAA Advanced Common User Access architecture, an instrument, such as a mouse, trackball, or joystick, used to move a pointer on the screen. pointings -Pairs of x-y coordinates produced by an operator defining positions on a screen with a pointing device, such as a mouse. polyfillet -A curve based on a sequence of lines. The curve is tangential to the end points of the first and last lines, and tangential also to the midpoints of all other lines. See also fillet. polygon -One or more closed figures that can be drawn filled, outlined, or filled and outlined. polyline -A sequence of adjoining lines. polymorphism -The ability to have different implementations of the same method for two or more classes of objects. pop -To retrieve an item from a last-in-first-out stack of items. Contrast with push. pop-up menu -A menu that lists the actions that a user can perform on an object. The contents of the pop-up menu can vary depending on the context, or state, of the object. pop-up window -(1) A window that appears on top of another window in a dialog. Each pop-up window must be completed before returning to the underlying window. (2) (D of C) In SAA Advanced Common User Access architecture, a movable window, fixed in size, in which a user provides information required by an application so that it can continue to process a user request. presentation drivers -Special purpose I/O routines that handle field device-independent I/O requests from the PM and its applications. Presentation Manager (PM) -The interface of the OS/2 operating system that presents, in windows a graphics-based interface to applications and files installed and running under the OS/2 operating system. presentation page -The coordinate space in which a picture is assembled for display. presentation space (PS) -(1) Contains the device-independent definition of a picture. (2) (D of C) The display space on a display device. primary window -In SAA Common User Access architecture, the window in which the main interaction between the user and the application takes place. In a multiprogramming environment, each application starts in its own primary window. The primary window remains for the duration of the application, although the panel displayed will change as the user's dialog moves forward. See also secondary window. primitive -In computer graphics, one of several simple functions for drawing on the screen, including, for example, the rectangle, line, ellipse, polygon, and so on. primitive attribute -A specifiable characteristic of a graphic primitive. See graphics attributes. print job -The result of sending a document or picture to be printed. Print Manager -In the Presentation Manager, the part of the spooler that manages the spooling process. It also allows users to view print queues and to manipulate print jobs. privilege level -A protection level imposed by the hardware architecture of the IBM personal computer. There are four privilege levels (number 0 through 3). Only certain types of programs are allowed to execute at each privilege level. See also IOPL code segment. procedure call -In programming languages, a language construct for invoking execution of a procedure. process -An instance of an executing application and the resources it is using. program -A sequence of instructions that a computer can interpret and execute. program details -Information about a program that is specified in the Program Manager window and is used when the program is started. program group -In the Presentation Manager, several programs that can be acted upon as a single entity. program name -The full file specification of a program. Contrast with program title. program title -The name of a program as it is listed in the Program Manager window. Contrast with program name. prompt -A displayed symbol or message that requests input from the user or gives operational information; for example, on the display screen of an IBM personal computer, the DOS A> prompt. The user must respond to the prompt in order to proceed. protect mode -A method of program operation that limits or prevents access to certain instructions or areas of storage. Contrast with real mode. protocol -A set of semantic and syntactic rules that determines the behavior of functional units in achieving communication. (I) pseudocode -An artificial language used to describe computer program algorithms without using the syntax of any particular programming language. (A) pull-down -(1) An action bar extension that displays a list of choices available for a selected action bar choice. After users select an action bar choice, the pull-down appears with the list of choices. Additional pop-up windows may appear from pull-down choices to further extend the actions available to users. (2) (D of C) In SAA Common User Access architecture, pertaining to a choice in an action bar pull-down. push -To add an item to a last-in-first-out stack of items. Contrast with pop. push button -In SAA Advanced Common User Access architecture, a rectangle with text inside. Push buttons are used in windows for actions that occur immediately when the push button is selected. putback -To remove an object or set of objects from the lazy drag set. This has the effect of undoing the pickup operation for those objects putdown -To drop the objects in the lazy drag set on the target object. ═══ Glossary - Q ═══ queue -(1) A linked list of elements waiting to be processed in FIFO order. For example, a queue may be a list of print jobs waiting to be printed. (2) (D of C) A line or list of items waiting to be processed; for example, work to be performed or messages to be displayed. queued device context -A logical description of a data destination (for example, a printer or plotter) where the output is to go through the spooler. See also device context. ═══ Glossary - R ═══ radio button -(1) A control window, shaped like a round button on the screen, that can be in a checked or unchecked state. It is used to select a single item from a list. Contrast with check box. (2) In SAA Advanced Common User Access architecture, a circle with text beside it. Radio buttons are combined to show a user a fixed set of choices from which only one can be selected. The circle is partially filled when a choice is selected. RAS -Reliability, availability, and serviceability. raster -(1) In computer graphics, a predetermined pattern of lines that provides uniform coverage of a display space. (T) (2) The coordinate grid that divides the display area of a display device. (A) read-only file -A file that can be read from but not written to. real mode -A method of program operation that does not limit or prevent access to any instructions or areas of storage. The operating system loads the entire program into storage and gives the program access to all system resources. Contrast with protect mode. realize -To cause the system to ensure, wherever possible, that the physical color table of a device is set to the closest possible match in the logical color table. recursive routine -A routine that can call itself, or be called by another routine that was called by the recursive routine. reentrant -The attribute of a program or routine that allows the same copy of the program or routine to be used concurrently by two or more tasks. reference phrase -(1) A word or phrase that is emphasized in a device-dependent manner to inform the user that additional information for the word or phrase is available. (2) (D of C) In hypertext, text that is highlighted and preceded by a single-character input field used to signify the existence of a hypertext link. reference phrase help -In SAA Common User Access architecture, highlighted words or phrases within help information that a user selects to get additional information. refresh -To update a window, with changed information, to its current status. region -A clipping boundary in device space. register -A part of internal storage having a specified storage capacity and usually intended for a specific purpose. (T) remote file system -A file-system driver that gains access to a remote system without a block device driver. resource -The means of providing extra information used in the definition of a window. A resource can contain definitions of fonts, templates, accelerators, and mnemonics; the definitions are held in a resource file. resource file -A file containing information used in the definition of a window. Definitions can be of fonts, templates, accelerators, and mnemonics. restore -To return a window to its original size or position following a sizing or moving action. retained graphics -Graphic primitives that are remembered by the Presentation Manager interface after they have been drawn. Contrast with nonretained graphics. return code -(1) A value returned to a program to indicate the results of an operation requested by that program. (2) A code used to influence the execution of succeeding instructions.(A) reverse video -(1) A form of highlighting a character, field, or cursor by reversing the color of the character, field, or cursor with its background; for example, changing a red character on a black background to a black character on a red background. (2) In SAA Basic Common User Access architecture, a screen emphasis feature that interchanges the foreground and background colors of an item. REXX Language -Restructured Extended Executor. A procedural language that provides batch language functions along with structured programming constructs such as loops; conditional testing and subroutines. RGB -(1) Color coding in which the brightness of the additive primary colors of light, red, green, and blue, are specified as three distinct values of white light. (2) Pertaining to a color display that accepts signals representing red, green, and blue. roman -Relating to a type style with upright characters. root segment -In a hierarchical database, the highest segment in the tree structure. round-robin scheduling -A process that allows each thread to run for a specified amount of time. run time -(1) Any instant at which the execution of a particular computer program takes place. (T) (2) The amount of time needed for the execution of a particular computer program. (T) (3) The time during which an instruction in an instruction register is decoded and performed. Synonym for execution time. ═══ Glossary - S ═══ SAA -Systems Application Architecture. SBCS -Single-byte character set. scheduler -A computer program designed to perform functions such as scheduling, initiation, and termination of jobs. screen -In SAA Basic Common User Access architecture, the physical surface of a display device upon which information is shown to a user. screen device context -A logical description of a data destination that is a particular window on the screen. See also device context. SCREEN$ -Character-device name reserved for the display screen. scroll bar -In SAA Advanced Common User Access architecture, a part of a window, associated with a scrollable area, that a user interacts with to see information that is not currently allows visible. scrollable entry field -An entry field larger than the visible field. scrollable selection field -A selection field that contains more choices than are visible. scrolling -Moving a display image vertically or horizontally in a manner such that new data appears at one edge, as existing data disappears at the opposite edge. secondary window -A window that contains information that is dependent on information in a primary window and is used to supplement the interaction in the primary window. sector -On disk or diskette storage, an addressable subdivision of a track used to record one block of a program or data. segment -See graphics segment. segment attributes -Attributes that apply to the segment as an entity, as opposed to the individual primitives within the segment. For example, the visibility or detectability of a segment. segment chain -All segments in a graphics presentation space that are defined with the `chained' attribute. Synonym for picture chain. segment priority -The order in which segments are drawn. segment store -An area in a normal graphics presentation space where retained graphics segments are stored. select -To mark or choose an item. Note that select means to mark or type in a choice on the screen; enter means to send all selected choices to the computer for processing. select button -The button on a pointing device, such as a mouse, that is pressed to select a menu choice. Also known as button 1. selection cursor -In SAA Advanced Common User Access architecture, a visual indication that a user has selected a choice. It is represented by outlining the choice with a dotted box. See also text cursor. selection field -(1) In SAA Advanced Common User Access architecture, a set of related choices. See also entry field. (2) In SAA Basic Common User Access architecture, an area of a panel that cannot be scrolled and contains a fixed number of choices. semantics -The relationships between symbols and their meanings. semaphore -An object used by applications for signalling purposes and for controlling access to serially reusable resources. separator -In SAA Advanced Common User Access architecture, a line or color boundary that provides a visual distinction between two adjacent areas. serial dialog box -See modal dialog box. serialization -The consecutive ordering of items. serialize -To ensure that one or more events occur in a specified sequence. serially reusable resource (SRR) -A logical resource or object that can be accessed by only one task at a time. session -(1) A routing mechanism for user interaction via the console; a complete environment that determines how an application runs and how users interact with the application. OS/2 can manage more than one session at a time, and more than one process can run in a session. Each session has its own set of environment variables that determine where OS/2 looks for dynamic-link libraries and other important files. (2) (D of C) In the OS/2 operating system, one instance of a started program or command prompt. Each session is separate from all other sessions that might be running on the computer. The operating system is responsible for coordinating the resources that each session uses, such as computer memory, allocation of processor time, and windows on the screen. Settings Notebook -A control window that is used to display the settings for an object and to enable the user to change them. shadow -An object that refers to another object. A shadow is not a copy of another object, but is another representation of the object. shadow box -The area on the screen that follows mouse movements and shows what shape the window will take if the mouse button is released. shared data -Data that is used by two or more programs. shared memory -In the OS/2 operating system, a segment that can be used by more than one program. shear -In computer graphics, the forward or backward slant of a graphics symbol or string of such symbols relative to a line perpendicular to the baseline of the symbol. shell -(1) A software interface between a user and the operating system of a computer. Shell programs interpret commands and user interactions on devices such as keyboards, pointing devices, and touch-sensitive screens, and communicate them to the operating system. (2) Software that allows a kernel program to run under different operating-system environments. shutdown -The process of ending operation of a system or a subsystem, following a defined procedure. sibling processes -Child processes that have the same parent process. sibling windows -Child windows that have the same parent window. simple list -A list of like values; for example, a list of user names. Contrast with mixed list. single-byte character set (SBCS) -A character set in which each character is represented by a one-byte code. Contrast with double-byte character set. slider box -In SAA Advanced Common User Access architecture: a part of the scroll bar that shows the position and size of the visible information in a window relative to the total amount of information available. Also known as thumb mark. SOM -System Object Model. source file -A file that contains source statements for items such as high-level language programs and data description specifications. source statement -A statement written in a programming language. specific dynamic-link module -A dynamic-link module created for the exclusive use of an application. spin button -In SAA Advanced Common User Access architecture, a type of entry field that shows a scrollable ring of choices from which a user can select a choice. After the last choice is displayed, the first choice is displayed again. A user can also type a choice from the scrollable ring into the entry field without interacting with the spin button. spline -A sequence of one or more BВzier curves. spooler -A program that intercepts the data going to printer devices and writes it to disk. The data is printed or plotted when it is complete and the required device is available. The spooler prevents output from different sources from being intermixed. stack -A list constructed and maintained so that the next data element to be retrieved is the most recently stored. This method is characterized as last-in-first-out (LIFO). standard window -A collection of window elements that form a panel. The standard window can include one or more of the following window elements: sizing borders, system menu icon, title bar, maximize/minimize/restore icons, action bar and pull-downs, scroll bars, and client area. static control -The means by which the application presents descriptive information (for example, headings and descriptors) to the user. The user cannot change this information. static storage -(1) A read/write storage unit in which data is retained in the absence of control signals. (A) Static storage may use dynamic addressing or sensing circuits. (2) Storage other than dynamic storage. (A) style -See window style. subclass -A class that is a child of another class. See also Inheritance. subdirectory -In an IBM personal computer, a file referred to in a root directory that contains the names of other files stored on the diskette or fixed disk. swapping -(1) A process that interchanges the contents of an area of real storage with the contents of an area in auxiliary storage. (I) (A) (2) In a system with virtual storage, a paging technique that writes the active pages of a job to auxiliary storage and reads pages of another job from auxiliary storage into real storage. (3) The process of temporarily removing an active job from main storage, saving it on disk, and processing another job in the area of main storage formerly occupied by the first job. switch -(1) In SAA usage, to move the cursor from one point of interest to another; for example, to move from one screen or window to another or from a place within a displayed image to another place on the same displayed image. (2) In a computer program, a conditional instruction and an indicator to be interrogated by that instruction. (3) A device or programming technique for making a selection, for example, a toggle, a conditional jump. switch list -See Task List. symbolic identifier -A text string that equates to an integer value in an include file, which is used to identify a programming object. symbols -In Information Presentation Facility, a document element used to produce characters that cannot be entered from the keyboard. synchronous -Pertaining to two or more processes that depend upon the occurrence of specific events such as common timing signals. (T) See also asynchronous. System Menu -In the Presentation Manager, the pull-down in the top left corner of a window that allows it to be moved and sized with the keyboard. System Object Model (SOM) -A mechanism for language-neutral, object-oriented programming in the OS/2 environment. system queue -The master queue for all pointer device or keyboard events. system-defined messages -Messages that control the operations of applications and provides input an other information for applications to process. Systems Application Architecture (SAA) -A set of IBM software interfaces, conventions, and protocols that provide a framework for designing and developing applications that are consistent across systems. ═══ Glossary - T ═══ table tags -In Information Presentation Facility, a document element that formats text in an arrangement of rows and columns. tag -(1) One or more characters attached to a set of data that contain information about the set, including its identification. (I) (A) (2) In Generalized Markup Language markup, a name for a type of document or document element that is entered in the source document to identify it. target object -An object to which the user is transferring information. Task List -In the Presentation Manager, the list of programs that are active. The list can be used to switch to a program and to stop programs. terminate-and-stay-resident (TSR) -Pertaining to an application that modifies an operating system interrupt vector to point to its own location (known as hooking an interrupt). text -Characters or symbols. text cursor -A symbol displayed in an entry field that indicates where typed input will appear. text window -Also known as the VIO window. text-windowed application -The environment in which the operating system performs advanced-video input and output operations. thread -A unit of execution within a process. It uses the resources of the process. thumb mark -The portion of the scroll bar that describes the range and properties of the data that is currently visible in a window. Also known as a slider box. thunk -Term used to describe the process of address conversion, stack and structure realignment, etc., necessary when passing control between 16-bit and 32-bit modules. tilde -A mark used to denote the character that is to be used as a mnemonic when selecting text items within a menu. time slice -(1) An interval of time on the processing unit allocated for use in performing a task. After the interval has expired, processing-unit time is allocated to another task, so a task cannot monopolize processing-unit time beyond a fixed limit. (2) In systems with time sharing, a segment of time allocated to a terminal job. time-critical process -A process that must be performed within a specified time after an event has occurred. timer -A facility provided under the Presentation Manager, whereby Presentation Manager will dispatch a message of class WM_TIMER to a particular window at specified intervals. This capability may be used by an application to perform a specific processing task at predetermined intervals, without the necessity for the application to explicitly keep track of the passage of time. timer tick -See clock tick. title bar -In SAA Advanced Common User Access architecture, the area at the top of each window that contains the window title and system menu icon. When appropriate, it also contains the minimize, maximize, and restore icons. Contrast with panel title. TLB -Translation lookaside buffer. transaction -An exchange between a workstation and another device that accomplishes a particular action or result. transform -(1) The action of modifying a picture by scaling, shearing, reflecting, rotating, or translating. (2) The object that performs or defines such a modification; also referred to as a transformation. Translation lookaside buffer (TLB) -A hardware-based address caching mechanism for paging information. Tree -In the Presentation Manager, the window in the File Manager that shows the organization of drives and directories. truncate -(1) To terminate a computational process in accordance with some rule (A) (2) To remove the beginning or ending elements of a string. (3) To drop data that cannot be printed or displayed in the line width specified or available. (4) To shorten a field or statement to a specified length. TSR -Terminate-and-stay-resident. unnamed pipe -A circular buffer, created in memory, used by related processes to communicate with one another. Contrast with named pipe. unordered list -In Information Presentation Facility, a vertical arrangement of items in a list, with each item in the list preceded by a special character or bullet. update region -A system-provided area of dynamic storage containing one or more (not necessarily contiguous) rectangular areas of a window that are visually invalid or incorrect, and therefore are in need of repainting. user interface -Hardware, software, or both that allows a user to interact with and perform operations on a system, program, or device. User Shell -A component of OS/2 that uses a graphics-based, windowed interface to allow the user to manage applications and files installed and running under OS/2. utility program -(1) A computer program in general support of computer processes; for example, a diagnostic program, a trace program, a sort program. (T) (2) A program designed to perform an everyday task such as copying data from one storage device to another. (A) ═══ Glossary - U ═══ There are no glossary terms for this starting letter. ═══ Glossary - V ═══ value set control -A visual component that enables a user to select one choice from a group of mutually exclusive choices. vector font -A set of symbols, each of which is created as a series of lines and curves. Synonymous with outline font. Contrast with image font. VGA -Video graphics array. view -A way of looking at an object's information. viewing pipeline -The series of transformations applied to a graphic object to map the object to the device on which it is to be presented. viewing window -A clipping boundary that defines the visible part of model space. VIO -Video Input/Output. virtual memory (VM) -Synonymous with virtual storage. virtual storage -(1) The storage space that may be regarded as addressable main storage by the user of a computer system in which virtual addresses are mapped into real addresses. The size of virtual storage is limited by the addressing scheme of the computer system and by the amount of auxiliary storage available, not by the actual number of main storage locations. (I) (A) (2) Addressable space that is apparent to the user as the processor storage space, from which the instructions and the data are mapped into the processor storage locations. (3) Synonymous with virtual memory. visible region -A window's presentation space, clipped to the boundary of the window and the boundaries of any overlying window. volume -(1) A file-system driver that uses a block device driver for input and output operations to a local or remote device. (I) (2) A portion of data, together with its data carrier, that can be handled conveniently as a unit. ═══ Glossary - W ═══ wildcard character -Synonymous with global file-name character. window -(1) A portion of a display surface in which display images pertaining to a particular application can be presented. Different applications can be displayed simultaneously in different windows. (A) (2) An area of the screen with visible boundaries within which information is displayed. A window can be smaller than or the same size as the screen. Windows can appear to overlap on the screen. window class -The grouping of windows whose processing needs conform to the services provided by one window procedure. window coordinates -A set of coordinates by which a window position or size is defined; measured in device units, or pels. window handle -Unique identifier of a window, generated by Presentation Manager when the window is created, and used by applications to direct messages to the window. window procedure -Code that is activated in response to a message. The procedure controls the appearance and behavior of its associated windows. window rectangle -The means by which the size and position of a window is described in relation to the desktop window. window resource -A read-only data segment stored in the .EXE file of an application o the .DLL file of a dynamic link library. window style -The set of properties that influence how events related to a particular window will be processed. window title -In SAA Advanced Common User Access architecture, the area in the title bar that contains the name of the application and the OS/2 operating system file name, if applicable. Workplace Shell -The OS/2 object-oriented, graphical user interface. workstation -(1) A display screen together with attachments such as a keyboard, a local copy device, or a tablet. (2) (D of C) One or more programmable or nonprogrammable devices that allow a user to do work. world coordinates -A device-independent Cartesian coordinate system used by the application program for specifying graphical input and output. (I) (A) world-coordinate space -Coordinate space in which graphics are defined before transformations are applied. WYSIWYG -What-You-See-Is-What-You-Get. A capability of a text editor to continually display pages exactly as they will be printed. ═══ Glossary - X ═══ There are no glossary terms for this starting letter. ═══ Glossary - Y ═══ There are no glossary terms for this starting letter. ═══ Glossary - Z ═══ z-order -The order in which sibling windows are presented. The topmost sibling window obscures any portion of the siblings that it overlaps; the same effect occurs down through the order of lower sibling windows. zooming -The progressive scaling of an entire display image in order to give the visual impression of movement of all or part of a display group toward or away from an observer. (I) (A) 8.3 file-name format -A file-naming convention in which file names are limited to eight characters before and three characters after a single dot. Usually pronounced "eight-dot-three." See also non-8.3 file-name format.