TCHAR s[16]; wsprintf(s, L"wsprintf returns %3.2f", 123.03); ==> output: wsprintf return f swprintf(s, L"swprintf returns %3.2f", 123.03); ==> output: swprintf returns 123.03 The wsprintf() is one of the windows API. It's not support all format string.