Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello ALL,

I am migrating VC6 -> VS2008 using MFC.
I've spent several hours to find how to navigate from the Menu Editor (in the Resource View) directly to the Event function for a certain submenu item.

Working on VC6 I did it in the next manner (Dialog based, MCF):
1. Open Menu Editor
2. Select any menu item with the left button click
3. Ctrl+W (call Wizard)
4. In the appeared new dialog, rightmost EditBox select COMMAND
5. Click button Edit Code

It is all I need to "jump" to the target code part.

VS2008 (Dialog based, MFC):
1. Open Menu Editor
2. Select any menu item with the right button click
3. Context Menu > Add Event Handler
4. In the appeared dialog: buttons "Add and Edit" and "Cancel".
Add and Edit is active if a handler is not created. If handler already
present, only "Cancel" is active.

From msdn:
If the selected message type already has an event handler for the selected class, Add and edit is unavailable, and Edit code is available. Click Edit Code to open the text editor at the existing function.

There are no EditCode buttons in the dialog. Googling got nothing, its appears that nobody had problems with the menu message finding.

How can I find the target function?
Please do not suggest Find>All files>text :)
Posted
Updated 29-Jan-18 2:27am

Quote:
Please do not suggest Find>All files>text

Why not? ...that'll get you the event handler you need. As to why it's broken in Visual Studio... it's probably because the handler doesn't have the appropriate prototype. Visual Studio 6 never checked the prototypes to make sure they matched what was supposed to be there.... Visual Studio 2008 expects the prototypes to match what you're doing.
 
Share this answer
 
Hi,

assume I have menu:
MyMenu
---subitem1

Assume somewhere in depth of files and texts we have:
void CSomeDlg::OnMenuMyMenusubitem1()
{
...
}

Is there a way to find this "OnMenuMyMenusubitem1()" in one-two clicks?
The ancient VC6 seems to have more functionality than modern toys...
 
Share this answer
 

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