CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Threaded View

  1. #1
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    85

    CString format question...

    I'm trying to get a float formatted to a CString and displayed in an Edit box. So I'm going to do it like
    PHP Code:
    m_sStrRange.Format("%3.2f"m_fRange); 
    but I don't want to show trailing zeros. That is if the number is "19.00" I want to show "19", NOT "19.00". According to MSDN I have to use the # flag in my format statement and that's my problem. How do I use it in conjunction with the other flags in my code example?
    Last edited by Thresher; November 24th, 2003 at 03:39 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured