|
-
August 30th, 1999, 07:16 PM
#1
integer 2 CString ???
hi
how do I convert an number stored in integer format to a CString? I need this to print Text using the CDC.TextOut function. Or is there another way to do this, e.g a TextOut that handles integers too? It certainly doesn´t work if i just put the Integer variable instead of the CString in TextOut().
please give me some advice
-
August 30th, 1999, 07:30 PM
#2
Re: integer 2 CString ???
int iValue = 125;
CString szValue;
szValue.Format("%d", iValue); // Look up help for printf
Now use the CString object in your call to TextOut().
Rail
------------
Recording Engineer/Software Developer
Rail Jon Rogut Software
http://home.earthlink.net/~railro/
[email protected]
-
August 30th, 1999, 07:31 PM
#3
Re: integer 2 CString ???
Hello,
Try this one :
int nNum = 10; // an int for ex.
CString str;
str.Format( "%d",nNum );
// you have now str = "10";
YEOJ
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
|