having handle to a menu (HMENU) is it possible to find it's parent window (HWND)?
问题 I know about the option for system menu, that is the alt+space one. And it's not pretty it involves looping all open windows through GetNextWindow . But I want to ask in more general way. That is having any menu handle, not necessarily to system menu (that is easy to find for any window) is it possible to get to its parent window ? 回答1: In the particular case when hmenu obtained on the fly from an existing menu-window (class #32768): you can use GUITHREADINFO.hwndMenuOwner via