Coder's Guild Mailing List

Re: float number in windows

Posted by Kory Spansel on 2000-04-24

Thanks that's close to what I was looking for, but it's my fault cuz I 
worded myself wrong, what I really needed was a way to convert a float into 
a buffer.  I just used gcvt(), and sscanf worked fine for getting the 
number.  And yeah I know converting from a string to a float and back again 
sounds kinda stupid but that's how it worked out.  Another question tho, how 
can a manually force a repaint.  Right now I'm using SendMessage(hwnd, 
WM_PAINT, 0, 0);  I was wonder if there was a cleaner and better way to do 
it?  Thanks again.

Kory Spansel


>From: "Hal Bonnin" <triangle@xxxxxxx.xxx>
>Reply-To: tcg@xxxx.xx.xx
>To: koryspansel@xxxxxxx.xxx
>Subject: float number in windows
>Date: Tue, 25 Apr 2000 01:24:50 +0200 (MEST)
>
>
>----- Original Message -----
>From: "Kory Spansel"
>
>i always do this
>   float Velocity=(float)atof(Buffer);
>
>sscanf requires very specific data locations and you cant depend on it to
>return the right number.
>
>you also need to collect the text. i use the GetWindowText function for 
>edit
>controls and buttons.
>
>>

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com