Click to See Complete Forum and Search --> : Simple Type Conversion and Displaying values


August 7th, 1999, 02:50 AM
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

herbieII
August 7th, 1999, 08:03 AM
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