Home > Back-end >  How to convert receives the message parameter as a string?
How to convert receives the message parameter as a string?

Time:09-30

 
Var
Strtip: string;
The begin
Strtip:='loading... ';
SendMessage (VH, SetTip_Message, Integer (self. Handle), Integer (PChar (strtip)));




 
Procedure TfrmProgressbar. SetTipMessage (var MyMsg: TMessage);
Var
MyVal: integer;
StrTip: string;
The begin
MyVal:=MyMsg. LParam;


How to convert receives the message parameter as a string?
How to convert MyVal into string?

CodePudding user response:

 strtip:=pchar (mymsg LParam); 

CodePudding user response:

The same process should be available this way,

CodePudding user response:

 
Procedure TfrmProgressbar. SetTipMessage (var MyMsg: TMessage);
Var
MyVal: integer;
StrTip: string;
The begin
MyVal:=MyMsg. LParam;
StrTip:=pchar (MyVal);

CodePudding user response:

All received, the rest is just a type conversion,

CodePudding user response:

Without PChar directly Integer (Value), the receiving end casts back is ok

CodePudding user response:

reference 1st floor ksrsoft response:
 strtip:=pchar (mymsg. LParam); 

+ 1
  • Related