This is how you sendmessage a string passing it either WParam or LParam.
procedure MySenderFunction;
var
sText: String;
begin
sText := 'This is a test'.
SendMessage(Handle, WM_MYMESSAGE, Integer(@sText), 0) ;
end;
This is how you get the parameter being passed.
procedure MySenderFunction(Msg: TMessage);
var
sText: String;
begin
sText := PString(Msg.WParam)^;
end;
No comments:
Post a Comment