![]() |
TrackPopupMenuEx and menu messages |
Post Reply ![]() |
Author | |
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 899 |
![]() ![]() ![]() ![]() ![]() 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?
|
|
![]() |
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 |