home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mac / programm / 14365 < prev    next >
Encoding:
Internet Message Format  |  1992-08-22  |  1.4 KB

  1. Path: sparky!uunet!van-bc!rsoft!mindlink!a2251
  2. From: Daryl_Spitzer@mindlink.bc.ca (Daryl Spitzer)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: DeleteMenu doesn't work
  5. Message-ID: <14504@mindlink.bc.ca>
  6. Date: 22 Aug 92 17:20:34 GMT
  7. Organization: MIND LINK! - British Columbia, Canada
  8. Distribution: world
  9. Lines: 30
  10.  
  11. I'm trying to have a menu appear in the menu bar when a certain window is
  12. active, and disappear when anything else is.  But I can seems to remove the
  13. menu from the bar.  After lots of fiddling I finally tried stepping through
  14. this:
  15.  
  16. {
  17.         MenuHandle hMenu = NULL;
  18.  
  19.         hMenu = GetMenu( 901 );
  20.         InsertMenu( hMenu, 0 );
  21.         DrawMenuBar();
  22.         DeleteMenu( 901 );
  23.         DrawMenuBar();
  24. }
  25.  
  26. Everything works fine, except the menu is still there when the menu bar is
  27. drawn after DeleteMenu.  Inside Macintosh (volumes I & IV) don't have much
  28. to say about it.  I'm stumped.
  29.  
  30. Should I try tracing throgh DeleteMenu with MacsBug?  I'm not sure
  31. I'd recognize what I find there anyway.
  32.  
  33. I suppose I could use GetMenuBar & SetMenuBar, but since I'm using the THINK
  34. Class Library (which uses DeleteMenu) it would be a lot of work.
  35.  
  36. --
  37. -------------------------------------------------------------------
  38.  Daryl_Spitzer@mindlink.bc.ca     "Life isn't just, life just is."
  39.          a2251@mindlink.bc.ca              -- Me  (I think.)
  40. -------------------------------------------------------------------
  41.