Attempting to set focus to popup

I create a popup window (WS_POPUP & WS_EX_TOPMOST) that can receive focus when clicked. However, when the main application window is minimized, attempting to click a popup flashes the taskbar and immediately kills focus. Why is this happening and how to avoid it? How is the popup window related to the main window anyway, pretty sure if I had no main window at all this wouldn't happen.
Topic archived. No new replies allowed.