Print Page | Close Window

No statusbar update

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=983
Printed Date: 05 July 2025 at 11:24am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: No statusbar update
Posted By: Spud2000
Subject: No statusbar update
Date Posted: 26 July 2004 at 4:42am

Hi,

I've developed a MDI-Application.

When I'm loading popupmenu from a resource...

pPopupMenu->LoadMenu(IDR_XYZ); 

...and display it...

CXTPCommandBars::TrackPopupMenu(pPopupMenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON, aPoint.x, aPoint.y, this);

...then the mainframe received the WM_SETMESSAGESTRING and WM_POPMESSAGESTRING messages and I'm able to update the statusbar.

But when I'm using a dynamically built popupmenu, then the mainframe doesn't receive the WM_SETMESSAGESTRING and WM_POPMESSAGESTRING messages.

pPopMenu->AppendMenu(MF_STRING, ID_XYZ1, GetMyMenuLabel(i));
pPopMenu->AppendMenu(MF_STRING, ID_XYZ2, GetMyMenuLabel(2));
CXTPCommandBars::TrackPopupMenu(pPopupMenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON, aPoint.x, aPoint.y, this);

Strangely, when I'm using the MFC CMenu::TrackPopupMenu() - methode for displaying the menu, then the messages are fired.

thanks for any suggestions.




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