I want send and receive special message (like WM_COMMAND) to a window
in my application. But componets like TForm, TApplication have
encapsulated message handling.
Do you have any clue how to do it ?? Do I need write raw Windows
application for this purpose ??
Thanks
Imrich Kovac
type
TForm1 = class(TForm)
private
{ Private declarations }
public
procedure wmmove(var msg: tmessage); message wm_move; //trap wm_move message
{ Public declarations }
end;
var
Form1: TForm1;
implementation
procedure tform1.wmmove(var msg: tmessage);
begin
caption:=inttostr(left);
end;
>Subject: Send/Handle message to window question
>From: imr...@cmic.sk (Imrich Kovac)
>Date: Sun, 04 July 1999 03:39 PM EDT
>Message-id: <377fb547...@nntp.uunet.ca>
const
WM_FILEREADY = WM_USER + 2000;
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnMessage := AppMessage;
end;
procedure TForm1.AppMessage(var Msg: TMsg; var Handled: Boolean);
begin
if Msg.message = WM_FILEREADY then
begin
Memo1.Lines.LoadFromFile(StrPas(PChar(Msg.lParam)));
Handled := True;
end;
{ for all other messages, Handled remains False }
{ so that other message handlers can respond }
end;
Damian
Imrich Kovac <imr...@cmic.sk> wrote in message
news:377fb547...@nntp.uunet.ca...