Einzelnen Beitrag anzeigen

Benutzerbild von DGL-luke
DGL-luke

Registriert seit: 1. Apr 2005
Ort: Bad Tölz
4.149 Beiträge
 
Delphi 2006 Professional
 
#1

HWND_BROADCAST kommt nicht an?

  Alt 10. Jul 2006, 19:14
Hallo, folgende einfache Quelltexte:

Defs:
Delphi-Quellcode:
const
  // app will send this as broadcast when going online, with wparam = handle
  WM_OnlineStatement = WM_USER + 1;
  // app will answer to this with above broadcast
  WM_OnlineQuestion = WM_USER + 2; //EDIT: war vorher 1 :roll:

Prog1
Delphi-Quellcode:
procedure OnWMOnlineQuestion(var Msg: TMsg); message WM_OnlineQuestion;


procedure TFLogMan.OnWMOnlineQuestion(var Msg: TMsg);
begin
  Beep;
  PostMessage(HWND_BROADCAST,WM_OnlineStatement,Handle,0);
end;
Prog2
Delphi-Quellcode:
procedure TForm2.BSearchLogAppClick(Sender: TObject);
begin
  SendMessage(HWND_BROADCAST,WM_OnlineQuestion,Handle,0);
  Beep;
end;

procedure TForm2.OnWMOnlineStatement(var Msg: TMsg);
begin
  LogHandle := Msg.wParam;
  MLog.Lines.Add('Log App answered: ' + IntToStr(LogHandle));
end;
Hoffe das ist ausreichend als Basis.

Folgendes problem: Die Messages kommen nicht an, weder WM_OnlineStatement noch WM_OnlineQuestion.

Mach ich was falsch?

EDIT: Uppsala... die messagedef wird sofort umgebogen... please stand by...
EDIT2: hat nix gebracht
Lukas Erlacher
Suche Grafiktablett. Spenden/Gebrauchtangebote willkommen.
Gotteskrieger gesucht!
For it is the chief characteristic of the religion of science that it works. - Isaac Asimov, Foundation I, Buch 1
  Mit Zitat antworten Zitat