GENMENUX 3.0 provides additional functionality that adds power to the Visual FoxPro Menu Designer. GENMENUX is written entirely in FoxPro and is fully compatible with all Visual FoxPro versions. VPM Enterprise uses GENMENUX to provide additional functionality in your applications.
GENMENUX extends the control of code generated from FoxPro’s menu generation program, GENMENU. GENMENUX can be thought of as a When and Valid for GENMENU.
GENMENUX is enabled by inserting the following line in the SAPPFCNF.FPW (CONFIG.FPW) file:
_GENMENU = ‘\VPME91\PRGS\GENMENUX.PRG’
With this line, FoxPro will call GENMENUX.PRG instead of GENMENU.PRG to generate menu code. GENMENUX.PRG in turn calls GENMENU.PRG.
GENMENUX directives used in VPM Enterprise:
Used to conditionally release menu options as part of Menu Security.
This directive is inserted into the comment snippet of menu options that don’t already have a directive when you return to the Menu Builder from the FoxPro Menu Designer.
Directive format: *:IF _SCREEN.oApp.RunAdminTool(‘SEC_MENU’,’M’, ‘<Option #>‘,’<Menu #>‘)
‘SEC_MENU’ tells the routine that handles all Administrative Tools to run the routine that specifically handles security. The remaining parameters are used to find the corresponding security record so that the security routine can determine the user’s rights to access this particular menu option.
‘M’ identifies this as a Menu Security check.
‘<Option #>‘ is the unique (within this menu) option number that identifies this option. Prior to directives being inserted, the highest number already used is determined and is then used as a starting point for the new directives.
‘<Menu #>‘ is the unique number that identifies the menu. VPM Enterprise keeps track of the menu numbering internally. In new projects as well as VPM Enterprise, the main menu is number 1.