my god, do you even know what you're doing? Or how to read? Or how to... fml
EnumChildWindows, by the fucking name, it enumerates the child windows of ANOTHER window, the MainWindow for a process in your case, HWND is a type in c++, it has a meaning of 'handle to a window', which means you must pass the handle to the window (an IntPtr in .net) to the function that you want to get the child windows from, understood thus far?
the callback i declared above which you need in order to enumerate the child windows that i named 'ChildWindowsCallBack' has two parameters, the first one is another HWND (this time, the handle is retrieved for you to do what you need to do with it) the second one doesn't matter in this case.
So... if you want to get the window text from each HWND, you'll have to use the
https://msdn.microsoft.com/en-us/library...owText API which this time it seems to have a nice example on p/invoke,
http://www.pinvoke.net/default.aspx/user...windowtext
Then, if you still don't understand where's the text on the window, it's on the variable "sb" which is a stringbuilder in the example above.