这么简单的问题,难道就没人知道吗。不信邪(50分)

  • 主题发起人 chenzhihui
  • 开始时间
C

chenzhihui

Unregistered / Unconfirmed
GUEST, unregistred user!
Widestring转换为string用那个函数。
具体是情况时这样,解析xml文件时,编译能通过,但是执行时总是有这样的错误,
list:=TlistView.items.add;
list.Caption:=pchar(child_Node.Text);//有问题
第二行执行时总是有问题。
那位知道说说。谢谢了。
 
Unit
System
Category
character set conversions
function WideCharToString(Source: PWideChar): string;
 
function WideCharToString(Source: PWideChar): string;
具体是什么方法。
 
不用转换,直接用就行了。
list:=TlistView.items.add;
list.Caption:=child_Node.Text;
 
caption是string
list.caption:=string(child_Node.Text);
 
www.stonebloom.com
 

Similar threads

回复
0
查看
665
不得闲
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
顶部