home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!van-bc!rsoft!mindlink!a2251
- From: Daryl_Spitzer@mindlink.bc.ca (Daryl Spitzer)
- Newsgroups: comp.sys.mac.programmer
- Subject: DeleteMenu doesn't work
- Message-ID: <14504@mindlink.bc.ca>
- Date: 22 Aug 92 17:20:34 GMT
- Organization: MIND LINK! - British Columbia, Canada
- Distribution: world
- Lines: 30
-
- I'm trying to have a menu appear in the menu bar when a certain window is
- active, and disappear when anything else is. But I can seems to remove the
- menu from the bar. After lots of fiddling I finally tried stepping through
- this:
-
- {
- MenuHandle hMenu = NULL;
-
- hMenu = GetMenu( 901 );
- InsertMenu( hMenu, 0 );
- DrawMenuBar();
- DeleteMenu( 901 );
- DrawMenuBar();
- }
-
- Everything works fine, except the menu is still there when the menu bar is
- drawn after DeleteMenu. Inside Macintosh (volumes I & IV) don't have much
- to say about it. I'm stumped.
-
- Should I try tracing throgh DeleteMenu with MacsBug? I'm not sure
- I'd recognize what I find there anyway.
-
- I suppose I could use GetMenuBar & SetMenuBar, but since I'm using the THINK
- Class Library (which uses DeleteMenu) it would be a lot of work.
-
- --
- -------------------------------------------------------------------
- Daryl_Spitzer@mindlink.bc.ca "Life isn't just, life just is."
- a2251@mindlink.bc.ca -- Me (I think.)
- -------------------------------------------------------------------
-