title: How to separate a CString in MFC
body: <p>I have a string like this: <code>DialogTitle = IDD_SETTING_DLG</code> in a save file (i have already stored it in an array called <code>m_TextArray</code>).</p>
  
  <p>Now i want to get the <code>"IDD_SETTING_DLG"</code> part(or at least <code>" IDD_SETTING_DLG"</code>) and store it in a <code>CString</code> variable. I used the <code>Tokenize</code> method but it didn't work.</p>
  
  <p>Here are my codes:</p>
  
  <pre><code>BOOL CTab1::OnInitDialog()
  {
      UpdateData();
      ReadSaveFile();
      SetTabDescription();
      UpdateData(FALSE);
      return TRUE;
  }
  
  void CTab1::DoDataExchange(CDataExchange* pDX)
  {
      CDialog::DoDataExchange(pDX);
      DDX_Text(pDX, IDC_SHOWDES, m_ShowDes);
  }
  
  void CTab1::ReadSaveFile()
  {
      if (!SaveFile.Open(SFLocation, CFile::modeRead | CFile::shareDenyWrite, &amp;ex))
      {
          ReadSettingFile();
      }
      else
      {
          for (int i = 0; i &lt; 100; i++)
          {
              SaveFile.ReadString(ReadLine);
              m_TextArray[i] = ReadLine.GetString();
          }
      }
  }
  void CTab1::SetTabDescription() //m_TextArray[2] is where i stored the text
  {
      Position = 0;
      Seperator = _T("=");
  
      m_ShowDes = m_TextArray[2].Tokenize(Seperator, Position);
  
      while (!m_ShowDes.IsEmpty())
      {
                  // get the next token
          m_ShowDes = m_TextArray[2].Tokenize(Seperator, Position);
      }
  }
  </code></pre>
  
  <p>Anyone solution or hint would be very appreciated.</p>