Hi everyone,
Faced with a following problem:

I have a drop down menu with items. Each item has a sub menu.
The structure is as follows:
subid1
id0----subid1
subid1

subid1
id1----subid1
subid1

all sub items has the same id so when WM_MENUCOMMAND arrives it is necessary to determine the parent menu.
Found nothing in MSDN.
Do i need to interate through all id-x menus comparing the handle from WM_MEMUCOMMAND to current menu handle? Does win has internal tree of menu's handles?
Thanks in advance.