Status Bar text not updated with context menu

I have a MDI project that has a right-click context menu. I went to the properties of one of the menu items, and added some text in the prompt. When I right click and move my mouse over the menu item, the status bar isn't updated with the text from my menu item. I am loading my context menu in the OnRButtonUp function in my View class. I am assuming this is the expected behavior and I'll probably need to add some extra code to have my menu update the text on the status bar. Can someone help me understand where that text that I filled into the prompt field goes and how I can update my status bar with that text?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Nhl2kAuthor Commented:
This question deals with sending text to the status bar on a popup menu item. I am trying to get text on the status bar from a menu item that's in a context menu when I right click.
Ah yes; appologies.

I will try and find a way to do this later.
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Hi Nhl2k.

Sorry about the delay.  I have looked into this problem a little more, and found that you can get the status bar text to appear if the items in the context menu are also in the main application menu.  For example, you could have the option to create a new window in your context menu and also in the File menu; if both menus have the same ID (eg ID_CREATE_NEW_WINDOW) then the text specified as the prompt for the top level menu will also appear in that for the context menu.  However, adding a new item to the context menu that is not in the top level menu still refuses to show the status bar text.  This is annoying, and I will look into this even further as I cannot see why it should refuse to work.

Hope this update is of use; feel free to close this question you want.
Nhl2kAuthor Commented:
No problem. I'll leave the question open for a while and if you don't think you have an answer, just let me know and I'll close the question. I found it annoying too and it made me wonder how other applications do it. Even in Internet Explorer, if you right click and move your mouse over an item, it shows the status bar text, and I don't see why it's so hard to find documentation on this subject.
I have just created a simple MDI app that has a context menu; the status bar text is now updated fine !


I think the problem lies in where you are invoking the menu; it should be in

OnContextMenu(CWnd* pWnd, CPoint point)



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Nhl2kAuthor Commented:
Actually, you helped me solve the problem but it wasn't because the menu wasn't in the OnContextMenu function. For some reason, the book I am referencing passed the "this" pointer in the view class as the pWnd parameter to the TrackPopupMenu function, when I needed to use AfxGetApp()->m_pMainWnd to get the main window's pointer. I guess I should have posted the code I had for loading the menu but I didn't think that was the problem.
Thanks for the help!
Ah right, I had that problem too.  I think in the source code I referred to the question on EE that got me sorted; it is
http:Q_20285802.html for future reference.

Glad to help overall :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.