How to convert a CString object to integer in MFC.
CString
CString s; int i; i = _wtoi(s); // if you use wide charater formats i = _atoi(s); // otherwise