Reputation: 54113
I have an application right now that starts a process, then opens a file associated with that process (system.diagnostics.process.start("WM.exe")), however, the way they save, there is a window within a window. It's like in photoshop cs3 when you have many windows within the big window of the application. Right now I use an api call to findwindow which is the application itself, but within that I need to find the subwindow, of which I know the apptitle, and then I need to set its windowstate to maximized. Does anyone know how this can be done? I think there's a way to hook a handle, but how does one also maximize?
Thanks
Upvotes: 0
Views: 1833
Reputation: 27874
You can use FindWindowEx()
to look for sub-windows and other objects inside this Window.
Here are some exemples: http://www.google.com/search?q=findwindow+hide.the.taskbar
Edit:
Visual Studio comes with a tool named Spy++ which its very handy to identify the windows trees and class names of each of those objects.
If there isn't an specified class name to look for with FindWindowEx, you can use EnumChildWindows()
to test one by one.
Upvotes: 1