I am trying to make a system menu display from another application at the current position of cursor.(though currently I can not get it to display at all)
Exactly the same as when you right click on a a task in the task bar at the bottom of screen.
I have the window handle of the other application.
The following code is executed when the event WM_CONTEXTMENU is received(i know it passes here as it displays a message box if i put it in there.
It compiles fine but i get no menu.Code:HMENU hMenu; hMenu = GetSystemMenu(testItem->hWnd, 0); TrackPopupMenuEx(hMenu, TPM_LEFTBUTTON || TPM_LEFTALIGN, 50, 50, testItem->hWnd, NULL);
I can not get it to work for the life of me.