Help (please). An application is using this code (DELPHI) to broadcast messages to all top level apps:

Step 1:

FMsg := RegisterWindowMessage('JustForYou');

Step 2:

procedure tfrmTop.NotifyOthers(const x: string);
var
Atom: Integer;
begin
Atom := GlobalAddAtom(PChar(x));
SendMessage(HWND_BROADCAST, FMsg, Handle, Atom);
GlobalDeleteAtom(Atom);
end;


I need to write an application that reads these messages and reacts to them. Can someone help with a procedure (to put in another application) that will get the text of any and all such messages (which are sent repeatedly by the originating program)? They are one line long each time and I know their format.

I'm totally new to API, but I'm trying hard to catch up.

Thanks.