I think these are the main points when trying to do this:
A popup is a top-level window that has the same parent as the control. (i.e., the popup is not a child of the control. It is not a child at all, it is a top-level window, but one without a thick border, etc., so it does not look like a regular top-.) Therefore, it can extend beyond management boundaries.
When a popup is created, it is displayed using ShowWindow (hWndPopup, SW_SHOWNA), so that it does not accept input focus. This prevents an inactive parent window.
, SetCapture. , , , . , , ( , ). WM_CAPTURECHANGED, - . ReleaseCapture, .
WM_MOUSEACTIVATE, MA_NOACTIVATEANDEAT.