SetRegistryKey(_T("MyTestRegister")); //在HKEY_CURRENT_USER//software下生成 "MyTestRegister"
CString strUserName="i come from china";
WriteProfileString("LogInfo","UserName",strUserName); //向注册表HKEY_CURRENT_USER//software//MyTestRegister//LogInfo//分支下写入UserName 字符串行键值 "i come from china"
strUserName = GetProfileString("LogInfo","UserName");
读取到UserName的值 i come from china