Normally, if you use menus as they are designed and intended to be used, you
do not have to do any of this EG processing WM_MENURBUTTONUP as the menu
system itself handles this message.
It seems to me that you may be complicating things expecting them to be
complex.
If you have a context menu, then assemble the entire context menu before
calling Track... you won't then need to know anything about what goes on
while the menu is active. Similarly for resouce based menus EG the main menu
bar, modify the menu during the WM_INITMENU message and add / remove any
menu items you need to customise it before it is show.
In general it is regarded as not nice to have such context sensitive menus -
eg as per the Project Properties in VS.Net - the user will find it difficult
to learn when and why the various menu items appear and disappear. It is not
intuitive. Be careful to detail the whens and whys in online help. Consider
using the Enable / Disable methods and have all the options in the context
menu all the time - it is then an easy read for the user to see 'when I
right click on an object in state x this happens'.
- Tim
"Dark" <oceandark7@netscape.net> wrote in message
news:242f7055.0307261802.695c939@posting.google.co m...