Activate event handler and SetWindowPos()

Hi all. I've got a C++ application with an embedded Python interpreter,
running wxPython for the UI layer on Windows XP. At one point, I use the
SetWindowPos() Windows function to raise and activate a different
application. This works fine until I set up an event handler for the
activate event (either the app or frame). It totally hangs the application.

Note that it is just the fact that an event handler is set up that is causing
the problem: if the handler has nothing but "event.Skip()" it still hangs.

Any ideas?

The reason I set up the activate callback is so that my multi-window
application will raise all of its top-level frames whenever the application
is activated. If there is a prefered method for doing this, I'll just dispense
with the event handler...

As always, Thanks!

···

-------------------------------------------------------------------------------------
Jeff Kotula Systems Architecture Manager
Vital Images jkotula@vitalimages.com

Although the module is mathematically correct, the solution
is physically impossible. Either that, or you have actually
created mass and I will apologize for underestimating
your power.
    -- Things to Tell Programmers,
        Dilbert Short List

Jeff Kotula wrote:

Hi all. I've got a C++ application with an embedded Python interpreter,
running wxPython for the UI layer on Windows XP. At one point, I use the
SetWindowPos() Windows function to raise and activate a different
application. This works fine until I set up an event handler for the
activate event (either the app or frame). It totally hangs the application.

Note that it is just the fact that an event handler is set up that is causing
the problem: if the handler has nothing but "event.Skip()" it still hangs.

Any ideas?

Can you reproduce the problem in a Python-only app?

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!