home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!wupost!calvin.sbc.com!cunetto
- From: cunetto@calvin.sbc.com (Philip C. Cunetto)
- Subject: Bad MenuSelect return value
- Message-ID: <1992Jul31.202423.29383@sbctri.sbc.com>
- Sender: cunetto@sbctri.sbc.com (Philip C. Cunetto)
- Organization: Southwestern Bell Technology Resources, St.Louis, MO
- Distribution: usa
- Date: Fri, 31 Jul 92 20:24:23 GMT
- Lines: 21
-
-
- All of a sudden, it seems a call to MenuSelect in my application is
- behaving differently than before. MenuSelect is supposed to return
- a longint with the menuID in the high order word, and the index of
- the selected item in the low order word (assuming the user released
- the mouse on a valid menu item). That was apparently working
- correctly in my application for a long time.
-
- Now MenuSelect returns the correctly encoded menuID and item index,
- except that the high order bit in the returned longint is set (thus
- screwing up the value of the menuID). This does not seem to be a
- documented return value. Is the system trying to tell me something by
- flipping just the high order bit in an otherwise valid return value?
-
- This setting of the high bit happens on some menus and not others.
- It either happens on all items of a particular menu, or none of them. Never
- on some items in a menu but not others. It seems to happen on menus my
- application adds to the menu bar, not on menus already in the menu bar.
-
- Thanks in advance.
- Phil
-