home *** CD-ROM | disk | FTP | other *** search
/ Millennium Time Capsule / AC2000.BIN / disks / hbasic_1 / source / menutest.bas < prev    next >
Encoding:
BASIC Source File  |  1997-07-04  |  932 b   |  41 lines

  1.  
  2. LIBRARY "gemaes"
  3. DEFINT a-z
  4. REM $include pjcotest.lst
  5. REM $include gemaes.bh
  6.  
  7. REM $option k10,gy!
  8.  
  9. a=rsrc_load ("PJCOTEST.RSC")
  10. a=rsrc_gaddr (0,menu1,menuaddr&)
  11. a=rsrc_gaddr (0,popmenu,ptree&)
  12.  
  13. DIM mess(16)
  14. DIM messag(16)
  15. a&=VARPTR(mess(0))
  16. SPOKEL a&,ptree&
  17. SPOKEW a&+4,0 : REM was pop
  18. SPOKEW a&+6,1
  19. SPOKEW a&+8,0
  20. SPOKEW a&+10,0
  21. a=menu_attach (1,menuaddr&,pop,a&)
  22. REM d=menu_istart (1,menuaddr&,1,pop)
  23. REM tree points TO the object tree of the menu TO alter. imenu specifies 
  24. REM the object within the submenu which will be aligned with menu item 
  25. REM item.
  26.  
  27. REM b=form_alert (1,"[1][ "+STR$(a)+","+STR$(d)+" ][ Ok ]")
  28. menu_bar menuaddr&,1
  29.  
  30.  
  31. DO
  32.     evnt_mesag VARPTR(messag(0))
  33.     type=SPEEKW (VARPTR(messag(0)))
  34.     item=SPEEKW (VARPTR(messag(0))+6)
  35.     title=SPEEKW (VARPTR(messag(0))+8)
  36. LOOP UNTIL type=10
  37.  
  38. IF type=10 THEN
  39.     b=form_alert (1,"[1][ "+STR$(item)+" ][ OK ]")
  40.     menu_bar menuaddr&,0
  41. END IF