Hmm, it seems that not all threads have a hwnd. But if they have, you can use EnumWindows to enlist all hwnds in the screen and get their process ID. You can compare this ID with the one you have allready to find out what HWND belongs to what thread:
http://mail.python.org/pipermail/python-list/2003-March/153917.html
and
http://www.codeguru.com/forum/archive/index.php/t-229929.html
http://mail.python.org/pipermail/python-list/2003-March/153917.html
and
http://www.codeguru.com/forum/archive/index.php/t-229929.html