| |
 |
How do I broadcast a message (such as WM_WININICHANGE) to all top level Windows?
The Windows API function SendMessage() takes a 4 parameters. The first is the window handle. To broadcast to all top level Windows, use HWND_BROADCAST. The second parameter is the message itself, and then the WParam and the LParam parameters for the given message. For the WM_WININICHANGE message, wParam should be zero, and LParam should be either the address of a null terminated section name that changed, or nil if you want each window to examine all sections for the change. Passing a null value is not recommended unless you have modified several sections due to performance considerations.
Example:
var
s : array[0..64] of char;
begin
StrCopy(S, 'windows');
SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0, LongInt(@S));
end;
|
|
| Hits/month |
2,500,000+ |
Downloads (Since May 2000) |
7,393,709 |
| Total Files |
6,023 |
| Forum msgs |
7,670 |
| Articles/FAQs |
70+/900+ |
Top Selling Software at Amazon
|