Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to change __int64 to a CString

Posted on 2006-04-26
4
Medium Priority
?
796 Views
Last Modified: 2008-03-17
Hi Experts,

I want to set a Editbox in a dialog box to a __int64 value.
How can I change this to a CString?

CEdit editbox;
__int64 tempVal = 123456789;
editBox.SetWindowText( ?);

0
Comment
Question by:thanesh
  • 3
4 Comments
 
LVL 8

Expert Comment

by:Dariusz Dziara
ID: 16545046
printf("%I64", i64Val)
0
 
LVL 8

Expert Comment

by:Dariusz Dziara
ID: 16545075
Sorry it should be:
printf("%I64d", i64Val)
0
 
LVL 86

Accepted Solution

by:
jkr earned 300 total points
ID: 16545094
Actually, that should be

CEdit editbox;
__int64 tempVal = 123456789;
CString text;
text.Format("%I64d",tempVal);
editBox.SetWindowText( text);
0
 
LVL 8

Assisted Solution

by:Dariusz Dziara
Dariusz Dziara earned 200 total points
ID: 16545103
In you case it may be:
CString strText;
strText.Format("%I64d",  tempVal);
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question