Current location - Recipe Complete Network - Complete cookbook of home-style dishes - How to get the pointer of pop-up menu in VC programming
How to get the pointer of pop-up menu in VC programming
GetMenu () is the handle to get the window menu. There is a parameter in CreateWindow to set this, and MDI/SDI programs can get the main menu handle through this. If there is a menu, you can get DLG programs.

If it is a system menu-a pop-up menu of program icons, use GetSystemMenu. Get the main menu handle.

If it is a right-click menu, it is mostly a temporary handle, which is not easy to take. Unless it is a handle generated by the implementation, it is used directly when right-clicking. Then we can know the value of this handle.

Gets the number of menu items. Getmenuitemid getmenuiteminfo getmenusting, etc. Is all the data information of the item for which the menu handle is obtained.

GetSubMenu should be the function you want to get the handle to the submenu. For example, if you want to get the submenu of the pop-up menu, use this to get the handle of the submenu. Then, according to the above function of getting sub-items, get sub-menu information.

(See MSND for details. The explanation above is very detailed and there are examples. )