其他分享
首页 > 其他分享> > delphi10.1错误 E2010 Incompatible types: 'PWideChar' and 'string'

delphi10.1错误 E2010 Incompatible types: 'PWideChar' and 'string'

作者:互联网

错误:[dcc32 Error] Frm_Main.pas(243): E2010 Incompatible types: 'PWideChar' and 'string'

参考:https://www.cnblogs.com/ywangzi/archive/2013/01/06/2847441.html

if MessageBox(Handle
    ,'当前打印机是【'+cmbPrinter.Text+'】 ,可能不是TSC标签打印机,是否继续打印?'
    ,'确认信息框', MB_OKCANCEL) = IDOK then
begin
//xxxxx
end
else
begin
    Close;
    Exit;
end;

红色部分改为:

    ,PWideChar('当前打印机是【'+cmbPrinter.Text+'】 ,可能不是TSC标签打印机,是否继续打印?')

 

Delphi 中if else 的用法

https://blog.csdn.net/lubangxing/article/details/7541766

标签:打印机,PWideChar,string,Incompatible,TSC,cmbPrinter,https
来源: https://www.cnblogs.com/jijm123/p/14166210.html