win32gui question - is my window the foreground window?

Neurocrat neurocrat at one.net.au
Sun Jun 11 09:18:35 EDT 2000


Linus Chang <Linus_Chang1 at bigpond.com> writes:

> Hi all,
> 
> I'd like to detect if the window of my wxPython application is currently 
> the foreground window.
> 
> The way I'm thinking of doing this is to use the GetForegroundWindow 
> function to grab the handle of the current foreground window and compare 
> it with my own handle (got by using the GetActiveWindow function)

Could you elaborate on this?  Are you trying to determine whether your
application's main window is at the top of the Z-order? Are you trying
to determine this from *within* your application, or from another
process?



More information about the Python-list mailing list