Click here to Skip to main content
15,881,715 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

I´m trying to display the F1 help of a popup menu item but I can´t.
This Menu Item X is accesible from two places:

From Main Menu -> The F1 help is well displayed because windows send the correct ID of the Menu Item X.

From a Popup Menu (right click on a Dialog, a Popup Menu that contains the same Item X) -> When I try to display the F1 Help of this Menu Item X I can´t. The displayed help is the one of the Dialog. Windows send the ID of the dialog and not the ID of the menu item.

Is there a way to get the ID of the menu item (when the menu is displayed in a contextual popup) and not the ID of the dialog?

Thanks for your help,

Rafa
Posted
Comments
P Uday kishore 17-May-13 6:13am    
to get it from the pop up menu you should override a method like
oncommand.
for eg:
ON_COMMAND(ID of the item, &xxxx::xxxxx)
[no name] 20-May-13 6:25am    
dear friend at first you shuold add OnKeyDown() event to get the F1 button and after that you have to create a menu and call it by popupmenu.
to load menu use this code:
<pre>
CMenu m;
m.LoadMenu(IDR_MENU1);
SetMenu(&m);
</pre>
hope to help you
P Uday kishore 22-May-13 5:27am    
IS IT WORKING NOW?
Rafa Alcaide 22-May-13 10:57am    
Thanks,

by the moment, I´ve not work anymore on that. I will try and I will tell you in the next days.
Rafa Alcaide 23-May-13 4:05am    
Hello,

I don´t arrive to find a solution.

The menus and submenus are already developped. I don´t access to any item to see the help, I only press F1 when I´m on the Menu Item. Like that, the method HtmlHelp is always invoked.

When is invoked from a menu, the id of the item is well sent but when is invoked from a popupmenu th id of the item is not sent, is sent the id of the dialog.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900