Delphi32.com - Home!
| Home/News | Downloads | Forums | D32 Magazine | Resources | Info and Facts |  
 
 Broadcasting a message.


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;
    

     



  << Previous Faq     Complete List     Next Faq >>  



 
 Hits/month  2,500,000+ 
 Downloads
 (Since May 2000)
 7,393,709 
 Total Files  6,023 
 Forum msgs  7,670 
 Articles/FAQs  70+/900+ 
Kylix
Tips n Tricks
FAQs
Knowledge Base
Bug Listings
Articles
Books
Newsgroups
Links
Submissions
Testimonials
Advertising
Contact Us
About Us
Search Amazon:
Top Selling Software at Amazon

| Home/News | Downloads | Forums | Resources | Info and Facts | Testimonials |
  Site Search:
 


Comments/Problems: Webmaster@delphi32.com
Copyright © 1998-2006, Delphi32.com. All rights reserved.
Terms of Use