Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Popup menu with Tray Icon
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Popup menu with Tray Icon

 Post Reply Post Reply
Author
Message
fishy View Drop Down
Newbie
Newbie
Avatar

Joined: 26 October 2005
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote fishy Quote  Post ReplyReply Direct Link To This Post Topic: Popup menu with Tray Icon
    Posted: 26 October 2005 at 5:28pm
Hey everyone,

I am very new to the toolkit and I am fooling around with some things getting ramped up for a product my company is working on.  I am using the CXTTrayIcon class as in the examples and calling CXTPCommandBars::TrackPopupMenu(CMenu*,..) to display the menu associated with the tray icon.

In my application, I need the menu that pops up to be able to display dynamic content.  In previous MFC (non-codejock apps) this was solved by using ON_UPDATE_COMMAND_UI combined with pCmdUI->m_pMenu->AppendMenu(..).  Trying the same mechanism with my codejock app results in a little different behavior.  In the pure MFC app, the pCmdUI->m_pSubMenu and pCmdUI->m_pMenu members were usable values in some cases (such as when i the update message is passed on a submenu) but in the app with the tray icon, the m_pSubMenu and m_pMenu are always NULL - so I can't use the same technique that I am used to.  Interestingly enough, if i take out the call to CXTPCommandBars::TrackPopupMenu(CMenu*,...) and use the CMenu object's TrackPopupMenu method directly, then none of my ON_UPDATE_COMMAND_UI handlers are called at all.

My question is basically what is the best way to go about making a system tray popup menu that contains dynamic content.  I have tried using CXTPMenuBar, ON_UPDATE_COMMAND_UI, etc.. all without perfect results.  I am sure there is a good way to do this I am just not familiar enough with the toolkit yet.  Suggestions??

- Fishy
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 27 October 2005 at 7:09am
Please check Notification and DynamicPopups samples
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.