HWND_BROADCAST - doesn't work with PostMessage lazarus / 34-Windows ---------------------------------------------------------------------- Dibo · 2011-06-11 19:47 Hi, I am trying to send HWND_BROADCAST message (this is some kind of signal which is sended to all top windows) but this works only with SendMessage but documentation say that is should works with PostMessage too: http://msdn.microsoft.com/en-us/library/ms644944(v=vs.85).aspx And this is my code: Application 1 (sender) Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses windows; var  FMsg: UINT; begin   FMsg := RegisterWindowMessage('my_test_message');  // Works  windows.SendMessage(HWND_BROADCAST, FMsg, 1, 0);  // Doesn't work  //windows.PostMessage(HWND_BROADCAST, FMS, 1, 0);end;  Application 2 (Receiver) Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses windows;   type  TForm1 = class(TForm)    procedure FormCreate(Sender: TObject);  private    { private declarations }    MsgSignals: UINT;  protected    procedure WndProc(var TheMessage: TLMessage); override;  public    { public declarations }  end; procedure TForm1.FormCreate(Sender: TObject);begin  MsgSignals := RegisterWindowMessage('my_test_message');end; procedure TForm1.WndProc(var TheMessage: TLMessage);begin  if TheMessage.msg=MsgSignals then    Memo1.Append('WParam: '+IntToStr(TheMessage.wParam));  inherited WndProc(TheMessage);end;  I could leave SendMessage but it waiting for processing. Any idea? Is this a bug? Regards Stable Lazarus 0.9.30, FPC 2.4.2. Windows 7 32bit