当然找不到了,CWinApp自动将路径指向HKEY_CURRENT_USER\Software\LILY TECH\test3下,你只要strSection就可以了。
GetProfileString( _T("strSection"), strItem )

解决方案 »

  1.   

    GetProfileString  不是读ini的吗?
    它还能读注册表??????????
    我觉的要用RegOpenKeyEx, RegSetValueEx
    这一类的东东
      

  2.   

    朋友,我可以明确告诉你,GetProfileString  可以读注册表(因为你已经
    加上了SetRegistryKey(_T("LILY TECH"));)同意nustchen(壁虎)的看法!
      

  3.   

    要想读注册表,还是用WinAPI,比如楼上所说的RegOpenKeyEx, RegSetValueEx等。
      

  4.   

    什么方便用什么了,GETPROFILESTRING行就用他了
      

  5.   

        可以肯定用GetProfileString(),GetProfileInt(),GetProfileSection()可以取到注册表的值。
      DWORD GetProfileString(
           LPCTSTR lpAppName,        // _T("LILY TECH")
           LPCTSTR lpKeyName,        // strItem1
           LPCTSTR lpDefault,        // address of default string
           LPTSTR lpReturnedString,  // address of destination buffer
           DWORD nSize               // size of destination buffer
      );