CString strHexNum(_T("0x01a0"));int nNum = _tcstol(strHexNum, NULL, 16);
int iValue;StrToIntEx(str, STIF_SUPPORT_HEX, &iValue);