home *** CD-ROM | disk | FTP | other *** search
-
- SAMPLES.DOC File
-
- Notes on sample programs included with the Microsoft(R)
- C Optimizing Compiler Version 6.00
-
- (C) Copyright Microsoft Corporation, 1990
-
-
- Files Description
- ----- -----------
-
- GRDEMO.MAK GRDEMO illustrates general graphics techniques
- GRDEMO.C including drawing, animation, palette
- MENU.C switching, window adjustment, menus, and
- MENU.H turtle graphics. The MENU and TURTLE modules
- TURTLE.C are independent modules that could be used
- TURTLE.H in your own programs. Real mode only.
-
- CHRTDEMO.MAK CHRTDEMO illustrates presentation graphics
- CHRTDEMO.C techniques. You can use this program as a tool
- CHRTSUPT.C for testing different modes and options before
- CHRTDEMO.H building them into your own programs. Real mode
- only.
-
- SORTDEMO.C Visually illustrates six different sorting
- algorithms. The source code demonstrates how
- to make OS/2 calls. Real or protect mode.
-
- SNAP.C Runs in the background and saves the current
- screen in a file when a hot key is pressed.
- Protect mode only.
-
- INCLUDE.C A PWB extension file that implements an include
- command that finds and opens include files.
-
- TXTFMT.C A PWB extension file that implements various
- commands related to text formatting. You can use
- these commands to format paragraphs, center
- text, change case, and insert or delete tab
- spaces.
-
- FILTER.C A PWB extension file that implements a filter
- command. You can use it to replace a block of
- text with the output of a user-specified
- filter (such as the DOS SORT program).
-
- ======================< Note on Graphics Libraries >=======================
-
- GRDEMO and CHRTDEMO require GRAPHICS.LIB. CHRTDEMO also requires
- PGCHART.LIB. SORTDEMO requires GRAPHICS.LIB for DOS or GRTEXTP.LIB for
- OS/2. If you did not request these libraries in your combined library
- files during setup, you will get "unresolved external" linker errors
- when you try to compile the programs.
-
- If you are using CL, specify the library names on the command line.
- For example, use this command line to compile GRDEMO:
-
- CL GRDEMO.C MENU.C TURTLE.C GRAPHICS.LIB
-
- If you are using PWB, you can use the supplied program list (.MAK)
- files. These automatically add the appropriate libraries.
-
- ======================< Note on Naming Conventions >=======================
-
- The example programs use a subset of the naming conventions used in
- OS/2 and Windows include files. In this convention, the first
- character of an identifier is a lowercase letter called a prefix.
- Common prefixes include p (pointer), a (array), i (index), and c
- (count). After the prefix, there may be an additional lowercase tag,
- usually indicating type. Common tags include ch (char), f (flag), sz
- (zero-terminated string) l (long), and x or y (x or y coordinate).
- Following this there may be one or more qualifiers, each beginning
- with an uppercase letter. For example, an identifier called
- achFileName is an array (a) of characters (ch) containing a file name
- (FileName).
-