sending commands to other windows
Hi all Im wondering if there is anyway to have a program that sends WM_ messages to other windows programs that are running at the same time. Anyhelp would be appreciated.
Thanks
NextGenGamer
What you need is the handle of the window you want to send the messages to. Then you can use SendMessage, or PostMessage to deal with the actual sending.
To get the window handle, you can use something like FindWindow, or FindWindowEx.
Note that if you want to do something like (for example) moving the window to a different position, then sending a message isn''t the way you do it, in that case you''d use something like SetWindowPos, or SetWindowPlacement.
You would use messages to do something like making the window think that a menu item was clicked. But whatever you do, you''ll almost certainly need the window handle.
Hope that helps,
John B
To get the window handle, you can use something like FindWindow, or FindWindowEx.
Note that if you want to do something like (for example) moving the window to a different position, then sending a message isn''t the way you do it, in that case you''d use something like SetWindowPos, or SetWindowPlacement.
You would use messages to do something like making the window think that a menu item was clicked. But whatever you do, you''ll almost certainly need the window handle.
Hope that helps,
John B
The best thing about the internet is the way people with no experience or qualifications can pretend to be completely superior to other people who have no experience or qualifications.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement