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

    Simple Type Conversion and Displaying values

    How do you display values like a floating point? I have tried
    pDC->TextOut(20,20, pDoc->Somevalue); and I always get a type
    conversion error and the value does not display. This is in the
    Draw function of ClassView. Is there a function that I do not know
    about that can do this or is there a process for making this work?
    Thanks,
    Mark


  2. #2
    Join Date
    May 1999
    Location
    WA
    Posts
    236

    Re: Simple Type Conversion and Displaying values

    Your Somevalue can only be a character string such as CString. To display anything else it has to be formated: m_text.Format("%f", Somevalue);
    TextOut(0, 0, m_text); These examples are easy to find in you MSDN Library assuming you are using VC.

    Roger L. McElfresh

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