-
October 3rd, 2005, 05:54 PM
#1
Sending a message to all my applications.
Hi,
I am in the process of creating a set of applications which have numerous configuration settings. A seperate program has been made to manage these settings in an easy-to-use GUI.
How can I add a button to the manager which will alert these programs that configurations have changed?
All the message needs to include is the applications' name so that the target program can decide whether or not the message applies to it.
Unfortunately the FindWindowEx API function is not an option because the target application window captions could change at any time without the manager being updated.
Any help with this problem would be much appreciated!
Best Regards,
Lea Hayes
-
October 3rd, 2005, 07:50 PM
#2
Re: Sending a message to all my applications.
Check the SendMessage/PostMessage hWnd parameter in the MSDN:
hWnd
[in] Handle to the window whose window procedure will receive the message. If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows; but the message is not sent to child windows.
~christian
-
October 3rd, 2005, 10:11 PM
#3
Re: Sending a message to all my applications.
I would not advice broadcasting just any message (Windows or custom) since all windows that handle it may respond in non-predictable manner.
Use a message registered with RegisterWindowMessage.
There are only 10 types of people in the world:
Those who understand binary and those who do not.
-
October 4th, 2005, 04:33 AM
#4
Re: Sending a message to all my applications.
Hi,
Thankyou for your help it has worked great! I haved used the GUID generator with RegisterWindowsMessage API call which seems to have worked fine.
Thanks again!
Lea
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|