Print Page | Close Window

TrackPopupMenuEx and menu messages

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=8852
Printed Date: 03 July 2024 at 4:15am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: TrackPopupMenuEx and menu messages
Posted By: rdhd
Subject: TrackPopupMenuEx and menu messages
Date Posted: 21 November 2007 at 10:22am
I am calling the static TrackPopupMenuEx function that has the "pWnd" arg that the documentation says is the "owner window" and the "pWndOwner" that the documentation says "points to a CWnd object".
 
I am also adding TPM_RETURNCMD to the input flags.
 
My frame window handles WM_INITPOPUPMENU where we add bitmaps and enable/disable menu items etc. We also handle WM_MENUSELECT messages where we do tooltips for the tracked menu. These are called when I use the CMenu::TrackPopupMenuEx function.
 
When I use CodeJock, neither of these messages are sent to the frame window regardless of whether I set one or both CWnd args to my frame window. Hence my menu entries that need to be disabled are not being disabled and I do not get my tooltips for the menu.
 
Note: I also tried the non-static TrackPopupMenuEx after obtaining the command bars object from the frame window with the same results. Nor does removing TPM_RETURNCMD make any difference.
 
So:
 
How does the tracked menu obtain the bitmaps?
 
How do I get the normal menu messages (not just WM_COMMAND) sent to my frame window so I can influence the menu before it is presented to the user?
 



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