I'm working on a simple console application. It takes some command line parameters containing a path of a Win32 executable. What I need to do is execute that program, maximize the window, then capture its contents and output it to a file. My question is, after creating the process, how should I go about getting the HWND for the process' main window? After that, maximizing the window and capturing the contents shouldn't be a problem, but I'm not sure how to go out there and get the window handle. I'd appreciate any input you guys have on this. Thanks.