views:

189

answers:

1

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

A: 

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.

Havenard