OK, I've got a tree control that has top level group items with title nodes below them. The options in the popup menu are different depending on whether a group node or a title node has been selected.
I have a button that calls TrackPopupMenuEx and I want to use SetCursorPos to put the cursor on the top item of the popup. But Windows relocates the popup when it doesn't fit entirely on the desktop ...