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);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.