Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - TrackPopupMenuEx and menu messages
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

TrackPopupMenuEx and menu messages

 Post Reply Post Reply
Author
Message
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 867
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: TrackPopupMenuEx and menu messages
    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?
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.