根据指定的进程Id,来查找可见窗口。
long FindWindowByProcessId(process_id, class, title)
hwnd = dm.FindWindowByProcessId(123456, "", "记事本")