Print Page | Close Window

CXTTrayIcon: How to add dynamic menus ?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=86
Printed Date: 27 April 2024 at 12:37pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTTrayIcon: How to add dynamic menus ?
Posted By: rvoith
Subject: CXTTrayIcon: How to add dynamic menus ?
Date Posted: 03 July 2003 at 9:43am

I have an app similar to the TrayIconDlg-sample. I understand how I add static (ie. predefined) menus as a resource ID during the CXTTrayIcon::Create() method. But what if I want to change the menu during runtime ? I have tried several tricks in order to get to the menu - but without luck so far. Has anybody got any pointers on this topic ?

 



-------------
Best regards,
Bob
Proud Programmer!



Replies:
Posted By: rvoith
Date Posted: 03 July 2003 at 11:48am

Update! I think I'm on the track to something! By looking at how CXTTrayIcon::OnTrayNotfification() was constructed, I was able to understand (!) that I could create a message handler for the TIN_XT_TRAYICON message myself. This has now been done, and I'll try to see if I can construct the menu myself .... But, still, input are gladly accepted!

 



-------------
Best regards,
Bob
Proud Programmer!


Posted By: rvoith
Date Posted: 03 July 2003 at 11:58am

Yihaa  

It worked! My code is now very similar to the CXTTrayIcon!



-------------
Best regards,
Bob
Proud Programmer!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net