草
草原牧歌
Unregistered / Unconfirmed
GUEST, unregistred user!
function wsprintf(Output: PChar; Format: PChar;p0:Integer=0;<br> p1:Integer=0;p2:Integer=0;p3:Integer=0;p4:Integer=0;p5:Integer=0;<br> p6:Integer=0;p7:Integer=0;p8:Integer=0;p9:Integer=0): Integer; stdcall;<br> external 'user32.dll' name 'wsprintfA';<br> <br>procedure TMainFrm.Button2Click(Sender: TObject);<br>var<br> i1,i2,i3,i4,i5: Integer;<br> s1,s2: PChar;<br> s3,s4: PWideChar;<br> s5: char;<br> d: array[0..128] of Char;<br>begin<br> i1:= 100;i2:=200;i3:= 300;i4:=400;i5:= 500;<br> s1:= '123345'; s2:='67890';s3:='JQKA'; s4:='我们是一家人?'; s5:='a';<br> wsprintf(d,'i1:%d,i2:%x,i3:%d,i4:%d,i5:%d,s1:%s,s2:%s,s3%s,s4:%S,s5:%c',<br> i1,i2,i3,i4,i5,<br> Integer(s1),Integer(s2),Integer(s3),Integer(s4),Integer(s5));<br> showmessage(d);<br>end;<br>要使用这个函数,还有更好的办法吗?