If you have a solution for me please let me know
at:jasc...@hotmail.com
Thanks,
Jason
From MSDN:
CString str;
str.Format(_T("Floating point: %.2f\n"), 12345.12345);
--
Ajay Kalra [MVP - VC++]
ajay...@yahoo.com
Note: Please post all replies to newsgroup only.
"Jason Craig" <jasc...@hotmail.com> wrote in message
news:f310a7ab.01112...@posting.google.com...
The function you are looking for is CString::Format(..).
It is equivalent to the printf(...) function taking the output format and
list of arguments, writing the fromatted string to the CString object.
A simple example:
CString str;
double num;
num = 65.0;
str.Format("The value is: %f", num);
MessageBox(NULL, str, "",0);
The %f will be replaced by the string representation of your double.
See the documentation for CString::Format(...) and
printf(...) for full details of how to use the string formating functions.
also see sprintf(..) for writing to a string buffer.
Daniel Bevan
"Jason Craig" <jasc...@hotmail.com> wrote in message
news:f310a7ab.01112...@posting.google.com...