HOWTO: Retrieve Handles to Menus and SubmenusID: Q67688
|
To change the contents of a menu, you must have its handle. The handle
of the menu associated with a given window is available through the
GetMenu() function.
To obtain a reference to a particular text item in the menu, use the
GetMenuString() function. The definition for this function is:
GetMenuString(hMenu, wIDItem, lpString, nMaxCount, wFlag)
hMenu = The menu handle
wIDItem = The ID of the item or the zero-based offset of the
item within the menu
lpString = The buffer that is to receive the text
nMaxCount = The length of the buffer
wFlag = MF_BYCOMMAND or MF_BYPOSITION
Keywords : kbMenu kbNTOS kbResource kbGrpUser kbWinOS
Version :
Platform :
Issue type : kbhowto
Last Reviewed: March 6, 1999