Building and Running a QuickWin Program

Building a DOS program as a QuickWin program is a quick way to create a Windows-style program without knowing about the basics of Windows programming. The Development Environment sets up a window for the program and treats it like a CRT monitor. You can write to the screen and prompt for and receive input with standard non-Windows input/output routines such as printf and scanf.

QuickWin programs are appropriate when:

You want to learn programming fundamentals but prefer a Windows-based display to a character-based display

You already have the character-based source code for the program

The program doesn't need the full Windows graphical interface, but you want to take advantage of the extra memory provided in the Windows environment

WARNING:

QuickWin programs can only run in Windows Standard or Enhanced mode. Do not run a QuickWin program in Real mode.

To familiarize yourself with the steps for creating a QuickWin program, use the FIRST program from Chapter 3.

·To build and run a project as a QuickWin program:

1.From the Project menu, choose Open. The Open Project dialog box appears.

2.Enter a project name with a .MAK file extension and choose OK. The Edit Project dialog box appears.

3.Select a file to add to the project and choose Add, or double-click the filename. Repeat until all files are added to the project.

4.Choose OK. The project is set as the current project.

5.From the Options menu, choose Project. The Project dialog box appears.

6.Select the QuickWin EXE Program Type button (see Figure 4.1). The default compiler and linker options change to reflect the program type. See Part 2 for information about compiler and linker options.

7.From the Build Mode options, select Release.

8.Choose OK.

9.From the Project menu, choose Build. The project is automatically saved.

If no errors are reported, you can run the program. To do so, choose Go from the Run menu.

If you have used the FIRST program, you will see the FIRST screen (Figure 4.3).

Choose Exit from the File menu of the QuickWin program to quit the program and return to the Development Environment.

NOTE:

If you are creating a QuickWin program with only one source file, you can optionally elect not to create a project. If no project is specified, the Graphical Development Environment attempts to build the active source window using the current compiler and linker settings.