home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / amiga / programm / 12876 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  1.1 KB

  1. Path: sparky!uunet!mcsun!Germany.EU.net!math.fu-berlin.de!umn.edu!csus.edu!decwrl!sdd.hp.com!cs.utexas.edu!rutgers!netnews.upenn.edu!msuinfo!eecae.ee.msu.edu!griffin
  2. From: griffin@eecae.msu.edu (Dan Griffin)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Disabling Menu Items Under GadTools
  5. Message-ID: <1992Aug30.091742.10957@msuinfo.cl.msu.edu>
  6. Date: 30 Aug 92 09:17:42 GMT
  7. Sender: news@msuinfo.cl.msu.edu
  8. Organization: Michigan State University, College of Engineering, East Lansing
  9. Lines: 20
  10. Originator: griffin@eecae.ee.msu.edu
  11.  
  12.  
  13. For some reason I can't seem to get menu items disabled using GadTools doing:
  14.  
  15. ClearMenuStrip( Wnd );    
  16. menu[14].nm_Flags |= NM_ITEMDISABLED;
  17. menu[15].nm_Flags |= NM_ITEMDISABLED;
  18. SetMenuStrip( Wnd, Menus );
  19.  
  20. I plan to reenable them like this:
  21.  
  22. ClearMenuStrip( Wnd );                
  23. menu[14].nm_Flags &= ~NM_ITEMDISABLED;
  24. menu[15].nm_Flags &= ~NM_ITEMDISABLED;
  25. ResetMenuStrip( Wnd, Menus );
  26.  
  27. if I can get them turned off, first.  I know that NM_ITEMDISABLED sets a 
  28. bit (0x0010) so the above seems logical to me.  What am I doing wrong?
  29. -- 
  30. Dan Griffin
  31. griffin@egr.msu.edu
  32.