mfc를 쓰다보면, CString으로 editbox의 값을 입력 받았다가, 숫자로 변환하여 쓰는 경우가 많다. 그럴때 숫자로 변환하는 방법이다.
(물론 다른 방법도 있다. float 일때 이렇게 사용된다. )
CString strValue;
GetDlgItemText( IDC_EDIT1, strValue);
float fValue = _tstof( strValue );

출처 :    http://gigaboy.egloos.com/10709387
Posted by 바람처럼..
|