Re: formated number in CEdit
I am not sure, but I think you variable is float. Make it double and everything will be ok.
Re: formated number in CEdit
This is not a problem with float or double. This is only with display: my CEdit box is to small to display all characters, so the user don't the last characters so he gets the impression that the number is far form 0 !!!!
Is there any possibility to force an appropriate display for numbers close to 0
Re: formated number in CEdit
I am not sure whether this will help, but you can force a display by typing
SetDlgItemText(IDC_EDITxx, "0.0");
and you could setup something like
if (m_fvalue < .00001) SetDlgItemText(....)
I hope this helps.
Re: formated number in CEdit
This helps, but if I have to check values, I will prefer to write something like:
1) add a member m_sValue to the CEdit
2) when m_fValue is updated,
m_sValue.Format("%7.3f",m_fValue);
UpdateData(FALSE);
And this is what I don't want to do, but it works...
Yves Le Sant
Metrology and Measurement Unit
Fundamental and Experimental Aerodynamics Departement
ONERA Meudon
(Office National d'Etudes et de Recherches Aérospatiales)
FRANCE