B Badlucky Unregistered / Unconfirmed GUEST, unregistred user! 2003-05-12 #1 请问有没有支持宽字符的格式化函数,需要格式化浮点类型。 wsprintf不能格式化浮点类型 sprintf不支持宽字符
C caidao Unregistered / Unconfirmed GUEST, unregistred user! 2003-05-16 #4 var w: WideString; s: AnsiString; begin w := '%s要好好学习,天天向上!' + '%f'; w := WideFormat(w, ['caidao', 13.14520]); s := string(w); ShowMessage(s); end
var w: WideString; s: AnsiString; begin w := '%s要好好学习,天天向上!' + '%f'; w := WideFormat(w, ['caidao', 13.14520]); s := string(w); ShowMessage(s); end
A anchony Unregistered / Unconfirmed GUEST, unregistred user! 2003-06-02 #6 这样行吗? CString str1; float f = 2.5; str1.Format("浮点数 %f",f); AfxMessageBox(str1);
S Sachow Unregistered / Unconfirmed GUEST, unregistred user! 2003-06-03 #7 wchar_t wsBuf[50]=L""; swprintf(wsBuf, L"%.2f", 3.1415); MessageBoxW(NULL, wsBuf, L"swprintf!", MB_OK);
wchar_t wsBuf[50]=L""; swprintf(wsBuf, L"%.2f", 3.1415); MessageBoxW(NULL, wsBuf, L"swprintf!", MB_OK);