Resizing a third-party application / Window handles
When my application is launched, I resize my application window and another
application's window so that they split the screen according to values for
Left, Top, Height, and Width that are stored in the registry. To resize
the other application's window, I've tried to use both the SetWindowPos and
the MoveWindow functions, but even though the application does get resized
to the size that I wanted, both commands "cut off" the menubar and toolbar
. Then, if I manually resize the application using the mouse, the menubar
and toolbar reappear.
A coworker had mentioned that I may not have the correct window handle.
In order to grab the window handle, I use a combination of EnumWindows and
GetWindowsText to find a match for the name of the application. Is the GetWindowsText
only grabbing the handle for the titlebar? If so, what can I use to grab
the container so that my SetWindowPos command works properly?
Any help in this matter would be greatly appreciated!
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center