![]() |
Popup menu with Tray Icon |
Post Reply ![]() |
Author | |
fishy ![]() Newbie ![]() ![]() Joined: 26 October 2005 Status: Offline Points: 17 |
![]() ![]() ![]() ![]() ![]() 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 |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Please check Notification and DynamicPopups samples
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |