tags:

views:

24

answers:

1

Hi,

I've created a popup window with SW_SHOWNA. The problem is when I move the main window behind the popup window the popup window stays at the same place. Is there any way to catch the click on the title bar (or other technique) of the main window behind the popup window and to close the popup window?

thanks a lot!

mike.

A: 

Yes, just do it. I would however not react to the click, as it makes your behavior mouse-bound. From your description, it seems you want to close the popup on a window move, so trap that message (WM_WINDOWPOSCHANGING) instead. This will catch keyboard-initiated moves as well.

MSalters
The main window in my case is IE, the popup window doesn't get any message when I click or move the IE window.I could maybe catch the messages IE receives, but that might be a problem in IE8 since there it's a different process.
mike
Please update your question, I understood you owned the main window too. This is a significant complication.
MSalters