James Cadd
James Cadd

Reputation: 12216

Get child window handles in C#

I'm starting a process in C# and then sending Windows messages to that process with SendMessage. Usually I send the messages to Process.MainWindowHandle, but in some instances I might need to find a child window handle and send messages there instead. How would I do that in C# and what are the options for finding child windows (i.e. do a need to know the name of the window or are there other options)?

Upvotes: 3

Views: 17237

Answers (1)

Shay Erlichmen
Shay Erlichmen

Reputation: 31928

Take a look at EnumChildWindows (pinvoke.net)

Upvotes: 1

Related Questions