Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - menuclear() clear a menu system from memory http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 menuclear()         Clear a menu system from memory
------------------------------------------------------------------------------
 Declaration
   menu.hdr

 Syntax
   func logical menuclear extern
   param value _MENU pMenu

 Arguments
   pMenu is the pointer to a previously created menu system. If 0, the
         default menu will be used.

 Return
   A logical indicating the success of this function. If .t., the menu could
   be cleared, if .f., an invalid menu pointer was specified.

 Description
   This function frees all memory allocated for the menu system specified by
   the pMenu parameter. If pMenu is 0, the default menu system will be
   cleared. If sub-menus are assigned to one or more menu items, the memory
   allocated for the sub-menus is also cleared, so there is no need to call
   the menuclear() function for sub-menus separately.

 Example
   #define EXAMPLE_MENU
   #include example.hdr

   proc Test_menuclear
   vardef
      _MENU pMenu
   enddef
   menuseterror( .f. )      // Turn off menu run-time error handling
   ? coreleft()             // Prints a value
   pMenu = menunew()
   ? coreleft()             // Prints a value smaller than the previous one
   ? menuclear( pMenu )     // Prints .T.
   ? coreleft()             // Again prints the first value
   ? menuclear( pMenu )     // Prints .F.
   endproc

   proc main
   Test_menuclear()
   endproc

See Also: menunew()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson