The Frame Menu Object - HTML2EXE Programming Interface

Document Path: Home Page / Programming / HTML2EXE / Interfaces / Frame Menu Object  
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 Visible
Methods AddCommand AddSeparator AddSubMenu CheckCommand Destory EnableCommand SetCallbacks
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:
  • BSTR subMenuName
Notes

AddSubMenu

Return Value
Arguments:
  • BSTR title
Notes

CheckCommand

Return Value
Arguments:
  • unsigned short cmdID
  • BOOL checked
Notes

Destory

Return Value
Notes

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
    }