*&* Add-in to the Class Browser for Include files... *&* >L< Lisa Slater Nicholls *&* January, 1997 This is a simple way to change #INCLUDE files globally and also should give you a good example of these techniques: 1) manipulating the Class Browser and its PEMs 2) calling a modal dialog from another dialog, passing a reference, so that appropriate messages can be shared between these objects, which is something that people seem to get confused about 3) manipulating SCXs and VCXs programmatically (in this case, to change #INCLUDE file locations or names and force a re-compile as necessary) Register this Add-in with the CB as follows: * start up the CB * _oBrowser.AddIn("Includes","ADDINCL.PRG","Init") -- use the full path name of the PRG! * then re-start the CB, since this addin is called in the Init() * Your add-in is now registered until you remove it from the CB options file, by default BROWSER.DBF in HOME(). The AddIn() method also allows you to remove (de-register) the addin, if you prefer. You may wonder why I chose to ADD an OBJECT (a command button) to the Browser by running code in the CB's Init(), rather than registering the add-on to run using the CB's add-on menu option. The answer is simply that I found the menu a bit clumsy to get to, and wanted my feature to appear like the other CB options on the top-line row of buttons. I also felt the simple code to adjust the dialog visually for my new member created a more instructive example than other methods of making it available. The following files are contained in ADDINCL.ZIP: Name Comments ---- -------- ADDINCL TXT This file. ADDINCL PRG #INCLUDE Add-in to Class Browser. Comments at top of file explain how to register it in the CB. ADDINCL SCT Include Editor modal dialog for #INCLUDE Add-in. ADDINCL SCX ADDINCL ICO Support files for Include Editor modal dialog. ADDINCL H Note: these files have been updated for the 5.0 Class Browser and in a couple of other ways, past their original 3.0 appearance in a Cobb IVFP article, but they have not been extensively tested in the current version. Always make backups when performing direct edits on SCXs and VCXs, as this Add-In does, until you're sure of a new tool!