UPDATED TO VERSION 1.03
=======================
This plugin allows you to have real windows menus in your DBP apps.
Commands:
CREATE MENU
DELETE MENU
ADD MAIN MENU <== Main headings, eg File / Edit etc.
ADD MENU ITEM <== Submenu items, eg Copy / Paste etc.
SET CHECKED <== Check or uncheck menu items
SET ENABLED <== Enable / Grey Out menu items
SET VISIBLE <== Hide / Show menu items
SET ITEM TEXT
GET MENU ITEM <== Returns item when one is clicked
New in 1.03
=========
Sub items
ADD SUB ITEM
SET RADIO (Radio type items)
SET RADIO GROUP
GET MENU ITEM STRING (Returns the caption of the menu item clicked)
GET MENU ITEM POSITION (converts the GET MENU ITEM Windows ID to menu/item/subitem positions)
All property setting commands now accept 2 as the flag, which switches the current setting (from TRUE to FALSE and vice versa)
The zip file includes a heavily commented example source code, plugin DLL and keywords ini file.
I hope this is useful for everyone.
The DLL file is 350KB but it compresses to 180KB when zipped, a little large but it includes a few of the major Delphi libs.
Version 1.03:
http://snow.prohosting.com/~clone99/downloads/tpc_menus_103.zip
[EDIT: If you have problems, use the temporary link below]
http://www.realgametools.net/forums/attachments/tpc_menus_103.zip
(Don't use right-click / Save As on this link. It won't work)
*Important Note about Usage*
You MUST call DELETE MENU before your program exits (apart from when the user uses the 'X' in the top right of the Window), otherwise it will crash.
example:
disable escapekey()
do
...stuff
if escapekey() then finish
loop
finish:
DELETE MENU