I’m trying to set the string value of an Edit Control to a value of a float number. So I’m first converting the float to a string, then I’m calling SetDlgItemText:
fvalue = 0.123;
wchar_t szBuff[100];
wsprintf(szBuff, L"%f", fvalue );
SetDlgItemText(m_hWnd, IDC_EDIT1, szBuff);
Unfortunately this doesn’t work and I get a stack overflow error. What am I doing wrong?
this is how I ended up doing it: