f_add_menuitem_rpt.srf 741 B

123456789101112131415161718
  1. $PBExportHeader$f_add_menuitem_rpt.srf
  2. $PBExportComments$the main function...~r~n hehe, only few scripts. :)
  3. global type f_add_menuitem_rpt from function_object
  4. end type
  5. forward prototypes
  6. global subroutine f_add_menuitem_rpt (menu vmmenu, integer arg_sit, readonly string ositemtext, readonly string ositemtag)
  7. end prototypes
  8. global subroutine f_add_menuitem_rpt (menu vmmenu, integer arg_sit, readonly string ositemtext, readonly string ositemtag);integer iiPos//arg_sit //
  9. iiPos=upperbound(vmMenu.item)+1 // can only append now
  10. menu lm
  11. lm=create m_rpt_dwprint_item
  12. vmMenu.item[iiPos]=lm.item[1] //must be item[1], or you'll find a funny result
  13. vmMenu.item[iiPos].text=osItemText
  14. vmMenu.item[iiPos].tag=osItemTag
  15. end subroutine