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

好的代码像粥一样,都是用时间熬出来的
原文地址:https://www.cnblogs.com/jijm123/p/14166210.html