How to enumerate all windows within a process?

前端 未结 4 1564
日久生厌
日久生厌 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:15

    3rd party aplication launched other windows not as child windows.

    It is possible to find out what is structure using Spy++ tool which comes with Visual Studio.

    After this, I was able to find necessary window using FindWindowEx function using WindowClassName (taken from Spy++): lastWindows = FindWindowEx(IntPtr.Zero, lastWindows, m.WindowClassName, null);

提交回复
热议问题