[python-win32] IsHungAppWindow or equivalent
Dahlstrom, Roger
rdahlstrom at directedge.com
Mon Apr 14 21:18:19 CEST 2008
-----Original Message-----
From: python-win32-bounces at python.org [mailto:python-win32-bounces at python.org] On Behalf Of Tim Golden
Sent: Monday, April 14, 2008 3:10 PM
Cc: Python-Win32 List
Subject: Re: [python-win32] IsHungAppWindow or equivalent
Dahlstrom, Roger wrote:
> Yeah - I see the MSDN page and the HWND parameter.
> I tried the following data types: C_short, c_ushort, c_int, c_uint,
> c_long, c_ulong, c_longlong, c_ulonglong.
ctypes includes a handy wintypes subpackage:
from ctypes import wintypes
print wintype.HWND
So, in principle:
<code>
import win32gui
import ctypes
from ctypes.wintypes import HWND
IsHungAppWindow = ctypes.windll.user32.IsHungAppWindow
def callback (hwnd, *args):
if IsHungAppWindow (HWND (hwnd)):
print win32gui.GetWindowText (hwnd)
win32gui.EnumWindows (callback, None)
</code>
TJG
=============================================================
That was exactly it - the HWND data type works perfect. Thanks!
-Roger
DISCLAIMER:
This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and
may contain legally privileged and/or confidential information. If you are not the intended recipient
of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and
any attachments thereto, is strictly prohibited. If you have received this in error, please immediately notify
me and permanently delete the original and any copy of any e-mail and any printout thereof.
E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept
liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission.
NOTICE REGARDING PRIVACY AND CONFIDENTIALITY
Direct Edge ECN LLC may, at its discretion, monitor and review the content of all e-mail communications.
www.directedge.com
More information about the python-win32
mailing list