반응형

http://ryumin13.tistory.com/129

 

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

CString strValue;
GetDlgItemText( IDC_EDIT1, strValue);
float fValue = _tstof( strValue );

 

반응형

+ Recent posts