I needed a context menu for my program and found the function TrackPopupMenuEx on MSDN. However this function doesn't return until the menu is closed, and I can't put all my other code on hold until it closes. So, does there exist some other function which returns immediately and just sends the result to the window's message loop?
I tried creating a new thread which just called TrackPopupMenuEx, but for some reason the menu never appeared even though no error was returned.
I also have another question; how can I get a handle to a child window with a specific identifier?