def window__get_thread_window_handles(thread_process_id):
"""
:param thread_process_id: thread process ID, as from window__get_thread_process_id
:return: hwnd for all top-level windows with this thread process id.
"""
ret = []
def callback(hwnd, lparam):
ret.append(hwnd)
return True
enum_win_proc = WINFUNCTYPE(c_bool, POINTER(c_int), POINTER(c_int))
windll.user32.EnumThreadWindows(wintypes.DWORD(thread_process_id), enum_win_proc(callback), None)
return ret
评论列表
文章目录