VERSION CONTROL MENU FOR PVCS  12/3/93

INTRODUCTION
This file describes the use of the VCS Menu example files
for Codewright version 3.0.   These files demonstrate how easily you
can modify and extend the Codewright menus and functionality without
compiling or recompiling anything.  At the same time, you may find
this example a useful addition to your use of Codewright.

WHAT IT DOES
This package modifies your Utility menu to create a Version Control
submenu.  On this submenu are entries for the following:

Check-in a file (moved to the submenu)
Check-out a file (moved to the submenu)
Lock the current file without checking it out.
Unlock the current file without checking it in.
Querying the latest revision number of the current file.
Querying who has the current file locked.
Comparing current file with the most recent revision in the archive.

These commands rely on you having the PVCS version control package
installed.  If you have another version control package, you can
quite likely modify it to work with your system just by editing a few
command lines contained in a text file.

HOW TO INSTALL AND USE
The steps to follow to install this package are relatively few.  They
are listed below:

	1. Place the supplied files MENUSECT.INI (and MENUSECT.DLL if
	you are using 3.00c or earlier) in the directory with your
	Codewright executables. The file MENUSECT.DLL contains the generic
	menu handler. This functionallity will be incorporated into
	the 3.00d release.  The MENUSECT.INI file contains the commands
	that are executed when you select items from the Version Control
	menu.

	2. Edit your CWRIGHT.INI file (Usually in your executables
	directory also), replacing the [Menu] section of the file with
	the contents of the supplied file VCSMENU.ADD.	(This file only 
	took a few moments to create with the Menu Editor.)

	3. Skip this step if you have version 3.00d or later.  In the
	[LibPreload] section of your CWRIGHT.INI file, add the following
	line:

	[LibPreload]
	LibPreload=MENUSECT.DLL
	
	4. Several of these menu items function as reports.  The reports
	will appear in a DOS window.  To stop these reports from
	disappearing before you can read them, you will need to modify
	one of the PIF files supplied with Codewright.  You will find the
	PIF file COMFGNML.PIF in the Codewright executable directory.
	Use the PIF editor to disable "Close window on exit" in this PIF.

	You will then have to close Codewright's DOS windows by hand.  If
	this becomes annoying, you can modify MENUSECT.INI to call batch
	files, instead of executing the commands directly.  You can then
	place the Pause command at the end of the batch file.

NOTE:  The comparison between the current file and the latest
revision in the archive will first appear in a DOS window, but don't
bother trying to review it there.  Instead, close the DOS window and
the comparison will reappear in Codewright's side by side
differencing window.

Please report any problems to Premia Tech Support.

HOW TO MAKE SIMILAR USES OF MENUSECT.DLL
---------------------------------------------------------------------
The usefulness of the Menu Editor is limited by the requirements of
menu handler functions.  You can't just assign any old function to
the menu.  It has to conform to the conventions of menu handler
functions in order to keep the stack straight.

MENUSECT.DLL contains a generic menu handler function named
ExecIDSection.  You can use the menu editor to assign this function
to as many new menu items as you like.  Just be sure to note the
Menu ID of each item that you add.  This will be a Hex number.  

One of the pieces of information the menu handler receives is the
ID of the menu item that called it.  The ExecIDSection function uses
this information to execute a section of a file named MENUSECT.INI.
It merely converts the ID to a string and uses ConfigFileRead to
execute that section.  For example, if you get the id of 1b03 when
you add an item to the menu, you need to create the section [1B03] in
the file MENUSECT.INI.  The Codewright API functions listed in this
section will be executed in the order listed.

You can use any interactive Codewright functions you like, but you
will probably find ExecUserCmnd most useful because it allows you to
refer to the current buffer by using % macros. (e.g., %r%e is the
filename of the current buffer, less any path element) You can call a
Windows or DOS app with this function.