how could you output a number into a edit box that has as many decimal points as the number and cuts off the remainder at four places past the decimal point. EX
1 wouldn't be 1.00000
1.345432 would be 1.3454
Thanx in Advance
how could you output a number into a edit box that has as many decimal points as the number and cuts off the remainder at four places past the decimal point. EX
1 wouldn't be 1.00000
1.345432 would be 1.3454
Thanx in Advance
In a perfect world every dog would have a home and every home would have a dog.
Visit My Web Site, Canine Programming
I use Win32 API
If I understand correctly, write a filter for numbers with zeros then print into string.
ie
if(((fNumber*100)%10==0)&&((fNumber*1000)%100==0)& &.......)
sprintf(sBuffer,"04.0f",fNumber);
else
sprintf(sBuffer,"%04.4f",fNumber);
SetDlgItemText(GetDlgItem(hDlg,IDC_EDIT),sBuffer);
(you get the idea)
Last edited by novacain; 04-29-2002 at 10:18 PM.
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill