How to find the application menu corresponding function through Spy + +

Source: Internet
Author: User

When an application is larger, the menu is a bit more, especially when the first contact with the program's source code, it will be difficult to find the entry point of the program. The following through Spy + + can be very fast access to this portal (program to have the source code)

1, run this application, such as A.exe, open Spy + + at this time, the window to find the current a.exe, and then messages only capture WM_COMMAND messages.

2, the operation of a a.exe to find the entrance of a menu, Spy + + will capture the message;

3, you can see the message of the WM_COMMAND message wid is: 33836, according to this ID to the source file Resource.h search, you can find similar to the following sentence:

#define ID_XX_XXXX 33836

Id_xx_xxxx here is the message menu ID to find, and then to find id_xx_xxxx in the source file, you will find a statement similar to the following:

On_command (id_xx_xxxx, onxxxx)

At this point the function onxxxx is the function of this message response.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.