Hi all. I've used to sample, and it works like a charm - though I wonder how it's possible to make the menu dissappear if I leftclick outside of it? It's enabled until I choose an item in the menu.
Oh, I forgot to mention - I've already fixed it by calling "SetForegroundWindow()" just before TrackPopupMenu().