I need write a program to resize other program's windows,
what I know is their HWND, How can I do it?
I'm trying this:
CWnd *pWnd = CWnd::FromHandle(handle);
pWnd->MoveWindow(x,y,w,h);
I need write a program to resize other program's windows,
what I know is their HWND, How can I do it?
I'm trying this:
CWnd *pWnd = CWnd::FromHandle(handle);
pWnd->MoveWindow(x,y,w,h);
That sends a wm_poschanged, a wm_move and a wm_size to the other window. If that other window explicitly doesn't respond to those messages, then your attempt won't work.
Also note that messaging between different integrity level apps (such as yours and explorer, say) is very limited under Vista/W7. This S.O. question may therefore be relevant to you.