我正在使用phpmailer但我不能发送带有$ mail-> addAttachment()方法的pdf。这不是我尝试过的。
TFormatSettings USFmt;
TFormatSettings EuroFmt;
void __fastcall InitFormats()
{
USFmt = TFormatSettings::Create();
USFmt.DecimalSeparator = _D('.');
USFmt.ThousandSeparator = _D('\0');
EuroFmt = TFormatSettings::Create();
EuroFmt.DecimalSeparator = _D(',');
EuroFmt.ThousandSeparator = _D('\0');
}
void __fastcall CheckLocalFormat(TCustomIniFile *Ini, String Section, String Name, double Default)
{
double value;
String s = Ini->ReadString(Section, Name, _D(""));
if (!TryStrToFloat(s, value))
{
if (!TryStrToFloat(s, value, USFmt) && !TryStrToFloat(s, value, EuroFmt))
value = Default;
Ini->WriteFloat(Section, Name, value);
}
}
void __fastcall CheckLocalFormat( )
{
TIniFile *MyList = new TIniFile(_D("C:\\MyList.ini"));
CheckLocalFormat(MyList, _D("Forex"), _D("Size"), 0.01);
CheckLocalFormat(MyList, _D("Forex"), _D("Value"), 10.0);
CheckLocalFormat(MyList, _D("Forex"), _D("Offset"), 0.01);
delete MyList;
}