•  Back 
  •  Main 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The GFA-Basic Compendium
Author      : GFA Systemtechnik GmbH
Version     : GFABasic.HYP v2.98 (12/31/2023)
Subject     : Documentation/Programming
Nodes       : 899
Index Size  : 28056
HCP-Version : 3
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Document not found
@help       : Help
@options    : +g -i -s +z
@width      : 75
@hostname   : STRNGSRV
@hostname   : CAB     
@hostname   : HIGHWIRE
@hostname   : THING   
View Ref-FileMENU_REGISTER(ap_id,m_text$)

ap_id: iexp
m_text$: sexp

Registers desk accessories in the 'Desk' menu and renames MultiTOS applications
which appear there.

Returns -1 if an error occured or a menu identifier if successful.

    ap_id   - Application identifier of the accessory.
    m_text$ - Name under which the accessory is to be entered into the menu
              (normally this is the accessory name).

Memo: Never use the built in MENU_REGISTER() function, instead call the
      AES directly. Calling MENU_REGISTER() seems to work but for some reason
      the entry itself under the 'Desk' drop down turns to garbage after a
      while.

FUNCTION menu_register(ap_id&,m_text%)
  $F%
  GCONTRL(0)=35
  GCONTRL(1)=1
  GCONTRL(2)=1
  GCONTRL(3)=1
  GCONTRL(4)=0
  GINTIN(0)=ap_id&
  ADDRIN(0)=m_text%
  GEMSYS
  RETURN GINTOUT(0)
ENDFUNC

menu_register()+