I know that I can populate a menu using a .INI file but I was wondering if it can be done using an XML file. I would like to be able to add parent and children menu items.
Below is a sample of what I want my XML to look like. Can anyone point me in the right direction?
<?xml version="1.0" encoding="utf-8" ?>
<!--
MENU only needs an ID
MITEM's can have the following Type: seperator, item, popup
MITEM TYPES
=============================================
POPUP - will indicate a new child window
ITEM - will indicate a child
SEPARATOR - will indicate a seperator.
-->
<ToolboxMenu>
<MENU ID="PROGRAMS">
<MITEM TYPE="POPUP" MENUID="ANTIVIRUS">Anti-Virus</MITEM>
<MITEM TYPE="POPUP" MENUID="MALWARE">Malware</MITEM>
<MITEM TYPE="POPUP" MENUID="SPYWARE">Spyware</MITEM>
<MITEM TYPE="SEPARATOR"></MITEM>
<MITEM TYPE="POPUP" MENUID="OSUTILITIES">OS Utilities</MITEM>
<MITEM TYPE="POPUP" MENUID="REMOTEDESKTOP">Remote Desktop</MITEM>
<MITEM TYPE="POPUP" MENUID="Test">Test</MITEM>
<MITEM TYPE="POPUP"></MITEM>
</MENU>
<MENU ID="ANTIVIRUS">
<MITEM TYPE="ITEM" FUNC="Programs\Kaspersky\kavkis.msi">Kaspersky</MITEM>
<MITEM TYPE="ITEM" FUNC="Programs\Trend Micro\Housecall.msi">Trend Micro</MITEM>
</MENU>
<MENU ID="MALWARE">
<MITEM TYPE="ITEM" FUNC=""></MITEM>
</MENU>
<MENU ID="SPYWARE">
<MITEM TYPE="ITEM" FUNC=""></MITEM>
</MENU>
<MENU ID="OSUTILITIES">
<MITEM TYPE="ITEM" FUNC="Programs\CCleaner\CCleaner.exe">CCleaner</MITEM>
<MITEM TYPE="ITEM" FUNC="Programs\Defraggler\Defraggler.exe">Defrggler</MITEM>
<MITEM TYPE="ITEM" FUNC="Programs\Recuva\Recuva.exe">Recuva</MITEM>
</MENU>
<MENU ID="REMOTEDESKTOP">
<MITEM TYPE="ITEM" FUNC="Programs\TeamViewer\TeamViewer.exe">Team Viewer</MITEM>
<MITEM TYPE="ITEM" FUNC="">Remote Desktop</MITEM>
</MENU>
<MENU ID="Test">
<MITEM TYPE="POPUP" MENUID="SubItem1">Sub Item 1</MITEM>
<MITEM TYPE="POPUP" MENUID="SubItem2">Sub Item 2</MITEM>
</MENU>
<MENU ID="SubItem1">
<MITEM TYPE="ITEM" FUNC="">Sub Sub Item 1</MITEM>
</MENU>
<MENU ID="SubItem2">
<MITEM TYPE="ITEM" FUNC="">Sub Sub Item 2</MITEM>
<MITEM TYPE="ITEM" FUNC="">Sub Sub Item 3</MITEM>
</MENU>
</ToolboxMenu>
I know this may seem a little confusing. I will try to explain as good as I can. I have a menu (called Menu1) that has a item called Programs in it. I was all the sub items to be populated off of the above XML file.
At the top of the file you will notice a section call PROGRAMS. This will load all the imidiate children. If the MITEM has a type of popup that will call a another menu below. If it has item, then it will be a clickable item with a FUNC that is the onclick event. If it has a type of separator, then it will be a typical seperator.
I'm hoping this will shed some lite on what I want to do.