| View previous topic :: View next topic |
| Author |
Message |
Dami Master Cheater
Reputation: 0
Joined: 23 Oct 2006 Posts: 336
|
Posted: Wed Jun 03, 2009 3:08 pm Post subject: [VC++] Convert a double to a string? |
|
|
I want to change IDC_EDIT1, caption to a number of a double variable.
I used "_itoa" for normal integers, but how am i suppose to throw double value in it?
Example of what i was using
| Code: | | SetDlgItemText(hWnd, IDC_EDIT1, _itoa((Value), buf, 10)); |
|
|
| Back to top |
|
 |
BirdsEye Advanced Cheater
Reputation: 0
Joined: 05 Apr 2008 Posts: 94
|
|
| Back to top |
|
 |
talkerzero Grandmaster Cheater
Reputation: 1
Joined: 24 Jul 2008 Posts: 560 Location: California
|
Posted: Thu Jun 04, 2009 6:37 pm Post subject: |
|
|
| lol, something tells me you're trying to set the EXP value!
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Thu Jun 04, 2009 7:27 pm Post subject: |
|
|
| colour0xFFA500 wrote: | | lol, something tells me you're trying to set the EXP value! |
Nuh Uh. Retrieving. Hes trying to convert # to $ so yea.
|
|
| Back to top |
|
 |
talkerzero Grandmaster Cheater
Reputation: 1
Joined: 24 Jul 2008 Posts: 560 Location: California
|
Posted: Thu Jun 04, 2009 9:48 pm Post subject: |
|
|
| dnsi0 wrote: | | colour0xFFA500 wrote: | | lol, something tells me you're trying to set the EXP value! |
Nuh Uh. Retrieving. Hes trying to convert # to $ so yea. |
Ah, right.
(edit) You could extract of the decimal places from the double, multiply it by (10 ^ number of decimal places), strcat() it to the whole number part of the decimal, then set that string with SetDlgItemText.
|
|
| Back to top |
|
 |
|