Click here to Skip to main content
15,927,593 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralText output in a CScrollView project Pin
Remco_lubbers25-Mar-02 9:38
Remco_lubbers25-Mar-02 9:38 
GeneralRe: Text output in a CScrollView project Pin
Joaquín M López Muñoz25-Mar-02 10:10
Joaquín M López Muñoz25-Mar-02 10:10 
GeneralChanging font for items in dropdown box Pin
Stew25-Mar-02 9:38
Stew25-Mar-02 9:38 
GeneralRe: Changing font for items in dropdown box Pin
Joaquín M López Muñoz25-Mar-02 9:58
Joaquín M López Muñoz25-Mar-02 9:58 
QuestionCString to Real? theories? Pin
dazinith25-Mar-02 9:09
dazinith25-Mar-02 9:09 
AnswerRe: CString to Real? theories? Pin
Ravi Bhavnani25-Mar-02 9:24
professionalRavi Bhavnani25-Mar-02 9:24 
GeneralRe: CString to Real? theories? Pin
dazinith25-Mar-02 9:30
dazinith25-Mar-02 9:30 
GeneralRe: CString to Real? theories? Pin
Ravi Bhavnani25-Mar-02 9:42
professionalRavi Bhavnani25-Mar-02 9:42 
Not quite.

What I meant was save the user's data as an integer. If they type 123.45, treat it as 12345 pennies instead of 123.45 dollars (or whatever decimal currency you're using). When displaying a penny amount, insert the decimal point at the appropriate point just before you set the edit/text control's string.

You must guard against floating point round-off errors when dealing with currency. Remember, there's no way to accurately store a floating point number like 123.45. The loss of accuracy will show itself when you use the amount in other calculations.

/ravi

"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com

AnswerRe: CString to Real? theories? Pin
Tim Smith25-Mar-02 9:35
Tim Smith25-Mar-02 9:35 
Generaldebugging issues Pin
Rajveer25-Mar-02 9:01
Rajveer25-Mar-02 9:01 
GeneralRe: debugging issues Pin
Nish Nishant25-Mar-02 9:04
sitebuilderNish Nishant25-Mar-02 9:04 
GeneralTrying to debug release version ? Pin
Jonathan de Halleux19-Jul-02 5:23
Jonathan de Halleux19-Jul-02 5:23 
GeneralMMC tutorials Pin
Prem Kumar25-Mar-02 9:00
Prem Kumar25-Mar-02 9:00 
GeneralRe: MMC tutorials Pin
Le centriste25-Mar-02 9:04
Le centriste25-Mar-02 9:04 
GeneralRe: MMC tutorials Pin
Prem Kumar25-Mar-02 9:16
Prem Kumar25-Mar-02 9:16 
GeneralRe: MMC tutorials Pin
Le centriste25-Mar-02 10:26
Le centriste25-Mar-02 10:26 
Generalsocket question Pin
25-Mar-02 8:09
suss25-Mar-02 8:09 
GeneralRe: socket question Pin
Nish Nishant25-Mar-02 8:23
sitebuilderNish Nishant25-Mar-02 8:23 
GeneralRe: socket question Pin
25-Mar-02 8:28
suss25-Mar-02 8:28 
GeneralRe: socket question Pin
Nish Nishant25-Mar-02 8:38
sitebuilderNish Nishant25-Mar-02 8:38 
GeneralRe: socket question (Thank you!) Pin
25-Mar-02 8:46
suss25-Mar-02 8:46 
GeneralThread communcation problem (repost) Pin
25-Mar-02 7:55
suss25-Mar-02 7:55 
GeneralRe: Thread communcation problem (repost) Pin
Nish Nishant25-Mar-02 7:54
sitebuilderNish Nishant25-Mar-02 7:54 
GeneralRe: Thread communcation problem (repost) Pin
Le centriste25-Mar-02 8:49
Le centriste25-Mar-02 8:49 
GeneralRe: Thread communcation problem (repost) Pin
Nish Nishant25-Mar-02 9:01
sitebuilderNish Nishant25-Mar-02 9:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.