
PROSTART.EXE Version 1.1 Code generator for PowerBASIC PBDLL60
The one that fires the FIRST time.

SUBCLASS.EXE Control subclass function builder.

REQUIREMENTS
~~~~~~~~~~~~
PowerBASIC PBDLL60 and the support files,
PBDLL.EXE
PBRES.EXE
RC.EXE
RESOURCE.H     PowerBASIC version.
Standard PowerBASIC include files.

DESCRIPTION
~~~~~~~~~~~
PROSTART.EXE is a code generator that will create operating system based
window and message handling code with the option of adding a tool bar, a
status bar and a working menu.

It is designed primarily for building startup project that are full window
type applications rather than being dialog box style applications. It has
text replacement options for the names of components in the Winmain /
WndProc functions.

It generates a main project file of the name you select, a header file with
the prototypes / declarations and GLOBAL declarations for values. The .RC
file is also generated. You can compile the project from the command line
by running the MAKEPB.BAT file that is written for each project. 

SUBCLASS.EXE is a separate utility for generating subclass code for controls.
You select the names you require and press the "Build" button and it will
write the code and load it into a supplied text editor for you to paste into
your code.

SETUP
~~~~~
PROSTART.EXE
Run the file and set up the paths required. There is a browse button for
each path for convenience. The paths are recorded in an INI file that the
program maintains so once they are set, you do not need to set them up
again unless you change the location of the required files.

SUBCLASS.EXE
The only requirement for subclass.exe is that the text editor "TheGun.exe"
is in the same directory. It uses the text editor to load and display the
code written by subclass.exe.

THEGUN.EXE
It is supplied as an accessory to SUBCLASS.EXE but it is a notepad
replacement that is smaller, faster and more powerful than the original.
Drag & Drop, wrap or normal, 4 meg size limit, basic printing capacity and
less than 19k in size.

USING PROSTART.EXE
~~~~~~~~~~~~~~~~~~
Once the paths are setup, you start a project by creating a target
directory and changing to it. There is a browse button which starts a
common dialog for this purpose. 

There are a set of text options for naming the main project file and names
such as the WndProc function and there are check box options for
characteristics of the window.

The option to include a toolbar has a text box to its left that is used to
set the number and spacing of the toolbar buttons. This is done by typing
in characters for buttons and spaces for spaces between the buttons.

Example : "111 111 111" will write 9 buttons with two spaces between groups
of three buttons.

Once all the options are set, click the "Create Project" button and the
files will be written to the project's directory. A dialog box will give
you the option of compiling the project. When the compile is finished you
can press the "Test Exe" button to see the compiled project.

You can change the options and recompile the project until it has the
configuration you require.

CODE DESIGN
~~~~~~~~~~~
The generated template is standard SDK style code which compiles at a
minimum size of 8192 bytes. It uses an efficient method of centering and
autosizing the window to suit the resolution of the screen and it uses a
normal WNDCLASSEX data structure and CreateWindow() call to start the main
window.

The WndClass function processes messages in the normal manner and different
options insert code into the message processing function. The toolbar code
is inserted into the WinMain() function and  displays an empty set of
toolbar buttons when the project is run.

There are different ways of writing toolbar code depending on the
requirements so the code that is inserted is not specified to any one
particular method. It can be used as is if you produce a toolbar bitmap of
the size you prefer and with bitmaps in the same order as the buttons.

This method works OK but there are other methods which allow selection of
bitmaps in different orders to their occurrence. This will have to be coded
manually. 

There is code inserted into the WM_COMMAND processing to display a dialog
box when a button is clicked showing the button ID.

---------------------------------------------------------------------------

The PROSTART.EXE programs can only be used by licenced PowerBASIC
programmers as it require PBDLL60 files to operate. 

SUBCLASS.EXE writes code for PBDLL60. The tiny text editor THEGUN.EXE is
supplied as an accessory to SUBCLASS.EXE. 

The three programs are available to PowerBASIC programmers FREE of any cost
whatsoever. The programs are not for sale and are not to be sold. They can
be given to whoever can use them as long as they are not sold.

Please note that the programs are not and will not be placed in the public
domain. All rights are reserved on the programs and they retain the status
of being private property.

Steve Hutchesson < hutch@pbq.com.au >
Sydney
Australia

I will post the latest versions of these programs on my home page.

www.pbq.com.au/home/hutch/
