        MAKEAPP Application Project Generator
        -------------------------------------

The MAKEAPP project generator is both a utility that will generate a template
Windows application for you, and a sample application that illustrates the
use of STRICT and windowsx.h.

The MAKEWC utility generates new window class source file for you, which can
be integrated into an application generated with MAKEAPP.

        Using MAKEAPP to generate Windows application projects
        ------------------------------------------------------

The MAKEAPP utility will generate a template application project for you.
Besides copying the template application, it renames the various files,
functions, and constants throughout the makefile and source files to names of
your choice.

To generate an application, just CD to the directory that contains makeapp
and type:

    makeapp destdir modulename ClassName

where:


    destdir     is the project directory you want files copied to,

    modulename  is the name of the application executable (excluding .exe)

    ClassName   is the name you want to use in the source for the window
                class and other identifiers.

For example:

    makeapp c:\myapp myapp MyApplication

will copy the sources to build myapp.exe into the directory c:\myapp.  The
application will create two window classes: MyApplication_Frame and
MyApplication_Client, which you can modify to add your own code.


        Using MAKEWC to generate a window class source
        ----------------------------------------------

The MAKEWC utility will generate source code for a template window class for
you.  Like MAKEAPP, it renames various aspects of the source code for you
based on parameters you specify.

To generate a new window class, just CD to the directory that contains
makeapp and type:

    makewc destdir filename ClassName TYPENAME ptrtype AppPrefix_ appname

where:

    destdir     is the project directory you want files copied to

    filename    is the name of the window class source and include file
                (excluding the .c or .h)

    ClassName   is the class name used for function name prefixes
                (i.e., ClassName_OnCommand, etc)

    TYPENAME    is the name of the instance data structure type
                (i.e., sizeof(TYPENAME));

    ptrtype     is the name to use for pointers to instance data
                (i.e., TYPENAME* ptrtype; )

    AppPrefix_  is the class name prefix to use for the registered
                classname.  The underscore must be included.
                (i.e., CreateWindow(..., "AppPrefix_ClassName", ...); )

    appname     is the name of the main application header file
                (i.e., #include "appname.h")

For example:

    makewc c:\myapp mywnd MyWnd MYWND pmwnd MyApp_ myapp

will create the files mywnd.c and mywnd.h in c:\myapp, that implement the
window class named MyApp_MyWnd.

To use this new window class source, you will need to update your makefile to
ensure the file is compiled and linked.  You will also need to update your
project's include file to ensure that the window class header file is included.


        How they work
        -------------

MAKEAPP and MAKEWC are fairly simple batch files that copies the template
files from the MAKEAPP directory to the directory you specify.  Some file
names, constants and function names in the copied source file are renamed
according to the parameters you provide.

The program REP.EXE is used to perform the global search-and-replace
operations required, and is called by makeapp2.bat.


        Template application architecture
        ---------------------------------

The template application is fully STRICT, and provides examples of the
features of windowsx.h: macro APIs, control APIs, and message crackers.

The application is designed to be easy to modify and add features to. It's
architecture is typical of a medium-sized Windows application: there is a
top-level "frame" window that manages the menus, which contains a "client"
child window that is sized to fit inside the client area.  A sample dialog
box is also shown.

You can use the 3.1 SDK dialog editor to edit the dialog box template
resources.

The application is divided into four main modules:

        app

    Contains the Windows application entry point (WinMain), handles
    application initialization and termination, and implements the
    application main loop and idle function.

        frame

    Implements the main window of the application.  The "frame" window
    defines the menu, and deals with other main-window responsibilities such
    as activation, application termination (with cooperation from the client
    window).  It arranges its child "client" window to occupy its client
    area. The frame window handles a few commands, but those it does not
    process are passed on to the client window.

        client

    The client window is responsible for the "client area" of the main
    application window.  It handles window painting, commands passed to it
    from the frame, focus, mouse input, and keyboard input, and the like.
    Handles the Sample/Dialog command, which brings up the sample dialog box.

        dlg

    Implements a sample dialog box, using message crackers and the control
    APIs.

    makeapp.h simply #includes all the include files required by this
    application.

    dlgdefs.h includes all of the definitions used in dialog boxes.  These
    are split into a separate .h file so it can be conveniently used with
    the 3.1 SDK Dialog Editor.

    makeapp.dlg includes all of the dialog templates.  These are created
    and edited using the 3.1 SDK Dialog Editor.


        Making changes to MAKEAPP template application
        ----------------------------------------------

You can make changes to the template application to suit your preferences:
change the indentation style, modify the makefile to use a different compiler
or different compiler switches, add or remove features, or whatever.  Then,
each time you run the makeapp batch file, the new application project will
reflect your changes.

As template files are copied, certain keywords in the source files are
replaced with parameters specified on the command line.  So if you're writing
code that you want renamed in some way, you must use these keywords.

    makeapp     - Changed to the modulename parameter.
    MakeApp     - Changed to the ClassName parameter

You'll need to modify makeapp.bat if you add (or remove) source files to the
project.

You can build the template application in the makeapp directory by typing
"nmake", assuming you have installed the SDK and the MS C 6 compiler.  This
will produce the windows application executable makeapp.exe.  If this file
exists and you try to run makeapp.bat, you'll get the "this application
requires Windows" message: to run the batch file you must delete makeapp.exe.


        Making changes to MAKEWC template window class
        ----------------------------------------------

The template window class is contained in the file MAKEWC.C and MAKEWC.H. In
order to compile and test the template window class, you can create a project
using makeapp that includes the MakeWc window class.

Replaced keywords are:

    MakeWc      - Class name
    MAKEWC      - Class instance data type name
    pmwc        - Class instance data pointer variable name
    MakeApp_    - Application name classname prefix
    makeapp     - Application file name
