The Frame Menu Object - HTML2EXE Programming Interface
Introduction
Each Frame has a Menu-bar. When a Frame is created, the Host loads the Main View's HTML document and sets the Menu-bar invisible. You should have codes in you Main View HTML to initialize Menu-bar - create sub-menu, add command, etc.
Properties
ItemCount
| Value |
ULONG |
| Access |
Get |
| Notes |
|
Visible
| Value |
BOOL |
| Access |
Get, Put |
| Notes |
|
Methods
AddCommand
| Return Value |
|
| Arguments: |
- BSTR subMenuName
- unsigned short cmdID
- BSTR cmdText
|
| Notes |
|
AddSeparator
| Return Value |
|
| Arguments: |
|
| Notes |
|
AddSubMenu
| Return Value |
|
| Arguments: |
|
| Notes |
|
CheckCommand
| Return Value |
|
| Arguments: |
- unsigned short cmdID
- BOOL checked
|
| Notes |
|
Destory
EnableCommand
| Return Value |
|
| Arguments: |
- unsigned short cmdID
- VARIANT_BOOL enabled
|
| Notes |
|
SetCallbacks
| Return Value |
|
| Arguments: |
- VARIANT funcExecuteCMD
- VARIANT funcOnMenuSelect
- VARIANT funcOnInitMenu
|
| Notes |
- Callback Functin Protypes (javascript):
//called when the user clicked the menu command
function funcExecuteCMD(FrameMenu, cmdID)
{
}
//called when the user is selecting menu command.
function funcOnMenuSelect(FrameMenu, cmdID)
{
//cmdID 0=mouse pointer not on the menu, -1=the menu is closed, other=command id the mouse pointer is on.
}
//called when the user begins to use the menu
function funcOnInitMenu(FrameMenu)
{
//enable/disable menu command items
}
|