How to enumerate all windows within a process?

前端 未结 4 1569
日久生厌
日久生厌 2020-12-06 18:44

I need to capture particular windows of 3rd party process. I can find main window handle as Process.MainWindowHandle, but what I can use to list other windows?

I am

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-06 19:40

    The EnumChildWindows function might help you out. The child windows could also have children and so on.

    There is also GetWindow and EnumThreadWindows

    Another post here with some more details: Get handles to all windows of a process

提交回复
热议问题