Like Victor said, use EnumThreadWindows().