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

Printable View

- 04-28-2002caninedecimal points
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 - 04-29-2002novacain
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)