-
September 4th, 2004, 09:36 PM
#1
-
September 5th, 2004, 12:06 AM
#2
Re: Double to CString Conversion using fcvt
Originally Posted by Charlie Curtis
Can anyone explain to me why this isn't working.
csRegHrs.Format("%0.2lf");
The above line produces 0.00? Instead it should be 10.00?
The Format() method of CString takes a format string AND values that have to be formatted.
Try:
csRegHrs.Format("%0.2f", <your_value>);
Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
Convenience and productivity tools for Microsoft Visual Studio:
FeinWindows - replacement windows manager for Visual Studio, and more...
-
September 5th, 2004, 01:42 AM
#3
Re: Double to CString Conversion using fcvt
It's always the simple things that hang you up... That was what I missed I wasn't paying close enough to the format string portion. So I added it and sure enough it works fine now!
Thanks for the help.
Charlie
Everything is Free Until You Have to Pay for it....
Platform is Windows 2000/XP Professional, Visual C++ 6.0
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|