Overview
ProGen Help

The Progen program is a missing link between Resource Workshop and Borland Pascal for Windows.  It reads in the 'RC' file created by Workshop and generates skeleton code to compile with BPW.

  You can generate code in two different formats: Combined Format and Split Format.  The RC file must be setup specifically for Progen, and a few precautions must be observed while de

  Once the RC file is generated, you can run the Progen program.  Basically, you tell it where the files are located, what their names are, a few element names, and Progen loads in all the menuitem, dialog and control names and parameters. If you are gene

  Now, you can set up some cross links within the program to make controls activate dialog boxes, close dialog boxes, and exit the program.  You can also set up an idle process name that will be called whenever the program is idle.

  When all this is done, you push the Build Source button and save about a weeks programming time!  You can then load the source code into BMW and try out your user interface to verify that you have everything right.  When it's done the way you want, you

  A word of caution!  Don't run Progen on source code you are already working on!  Progen will overwrite your old source code and it will be lost.  If you want to add something, copy the RC file to another directory, run Progen, and then strip out the sec

  Set up a Combined Format project with the Combined File Project menu selection.

  Set up a Split Format project with the Split File Project menu seletion.

  Load a setup file from disk.

  Save a setup file to disk.


Combined File Project
Combined File Format

  The Combined File Format is used for small applications where all the code will be in one file.  For smaller programs, it is convenient for search purposes to have everything together.

SEE ALSO:

Split Format


Split File Project
Split File Format

  The Split File Format is for larger programs that are too cumbersome to fit into one file.  Progen groups the definitions and code associated with each dialog box into its own Unit, which is added to the 'Uses' statement.

SEE ALSO:

Combined Format


Setting Up an RC File

  To set up an RC file in Resource Workshop, follow the follwing steps:

o    Start Workshop and select 'New Project' from the menu.

o    Click the 'RC' check box and push the 'OK' button.

o    Click the 'Add to Project' selection from the 'File' menu.

o    Click the drop down button for 'File Type' and select 'PAS pascal constant unit'.

o    Go back up and select a name (suck as 'Global.pas' or 'Consts.pas').

o    Click the 'Preferences' selection from the 'Files' menu.

o    Click the '.RES' option in the 'Multi-Save' section.

  Now, you are all set up and ready to start designing your project.  All you have to remember now is to follow the necessary precautions.

Overview


Precautions for RC file.
RC File Precautions

  The following precautions should be observed when developing your 'RC' file:

o    When you develop a control, Double-Click the 'Control ID' and enter a name.

     This is an identifier that will be copied into the Constant Unit.

     Pick a name that has some meaning, like 'Main_Dlg_Enter'.

o    When you create static text or groups (Things that don't control), enter

     a number of '-1' for the control ID.

o    Make sure you don't have any duplicate ID names or Numbers!!!

Overview


Combined File Project Dialog Box.
Combined File Project Dialog Box

  This is the main screen for developing Combined File Project.  The Controls available are:

o    Main File Names

o    Control Links

o    Idle Process

o    Build Source

o    Cancel

Overview


Split File Project Dialog Box.
Split File Project Dialog Box

  This is the main screen for developing Split Project.  The Controls available are:

o    Main File Names

o    Dialog/Unit Names

o    Control Links

o    Idle Process

o    Build Source

o    Cancel

Overview


Main File Names Dialog Box.
Main File Names Dialog Box

  This dialog box is for entering the main file names used for the project, along with some misc. other names required.

  The first thing you will see in the box at the bottom is a list of sub-directories under c:  Double click on the path names until you are where your 'RC' file exists.

  Click once in the 'RC File Name' box, and the box at the bottom will display the available selections.

  Click once in the 'Constants Unit Name' box, and the box at the bottom will display the available selections.

  Click on the 'Menu' box and type in the name of the main menu name created in Resource Workshop.

  Click on the 'Icon' box and type in the name of the main Icon name created in Resource Workshop.  This will be the Icon that will be displayed when the program is 'Minimized'

  Click the 'Done' button and you are on your way.  Click the 'Cancel' button if you want to go back and start over.

Overview


Dialog / Unit File Names Dialog Box.
Dialog / Unit File Names Dialog Box

  This dialog box is used to enter Unit Names to corespond to the Dialog Boxes in a Split Format project.  These names are then used to create Unit files, so the names must be eight characters or less, with no extention.

  All dialog boxes must be assigned a name.

  When the dialog box is initialized, all the names of the project dialog boxes appear in the combo-box.  When you click on one, it moves up the the selection part of the combo-box.  Click on the Unit name box and enter the desired name.

  Click the 'Enter' button, and that selection is tagged and moved to the bottom of the list.  Repeat for all of the dialog boxes.

  If you double-click on a tagged entry, the assigned name will appear in the Unit name box.  You can click on the clear button to clear it, or enter a new name if you wish.

  When you are done, click the 'Done' button, and your selections will be checked and entered.

Overview


Control Links Dialog Box.
Control Links Dialog Box

  This dialog box is where you can assign links between controls and certain activities.  The activities consist of openning a dialog box, closing a dialog box, and ending the program.

  When you open the Control Links dialog box, there are two combo-boxes in the display.  The left one contains all of the allowable controls.  The right one contains all the dialog box names, as well as 'Close_Dialog*' and 'End_Program*', Help_Directory*'

  and 'Help_Topic*'.

  You can assign many repeat actions, but only one action per control.  For instance, there can be many ways to open a certain dialog box, but only one action for a given button.

  When you click on a control, it will appear in the selection box of the combo-box.  The same happens when you click a dialog box or action from the right combo-box.  When you click enter, the control is tagged and moved to the bottom of the list.

  If you double-click on a tagged control, you will see what action or dialog box is assigned to it.  You can then clear it or enter a new action.

  When you are done, click the 'Done' button to terminate the operation.

  The 'Help_Topic*' action creates a link to a help file with the control as the ID.

  The 'Help_Directory*' action creates a link to the Help files 'Contents'.

Overview


Idle Procedure Dialog Box.
Idle Procedure Dialog Box

  The computer is not working continuously while you sit and stare at the screen.  Most of the time, the CPU is sitting there idle.  You can take advantage of that time to do things that are 'background' tasks.

  The way Windows operates is that it sends messages back and forth between the different modules, controls and boxes.  There is a procedure that checks for messages and dispatches them.

  You can override this procedure and have it call your own procedure when there are no messages to process.  This dialog box is where you enter a name for the Message Loop procedure to call.

  Simply enter the name in the name box and click 'Done'.  This will set the radio button in the project dialog box and flag the fact that you want an Idle Routine.  If the radio button is not set, no message loop text is entered into your program.

Overview


Build Source Code Button.
Build Source Code Button

  This button sets in motion the actual build process.  The first thing it does is check to see that all the required information is entered.

  Then it checks to see if you require an Idle Procedure.

  Then it creates the skeleton code in the directory where the 'RC' file resides.

  When it is done, a dialog box informs you of the number of lines of code created for you.


Cancel Button.
Cancel button

  This button cancels the project and returns you to the main window.  Any data entered, such as dialog box names and control links, is presearved.


Load File.
Load Setup File

  This function loads a setup file from a previous Save operation.  It recalls the Control Link, Unit Names, and Main Filename information.


Save Setup File.
Save Setup File

  This function saves the current setup into the main path.  This allows you to recall the setup, modify links and names, and re-build the source code.

  This allows you try out your User Interface, recall the settings, and easily modify it until you get it exactly the way you want it.