title: Visual C++ get string from Cedit
body: <p>This is probably a pretty basic question, but I can't seem to get it.  I am working on a visualC++ project and I basically want to get a string from a GUI and then use that as a filename.  I have written the following thus far, where IDC_FILE_NAME is the ID of the edit control box but I'm not sure if that is even the way to accomplish this.</p>
  
  <pre><code>m_pFileName = (CEdit*)GetDlgItem( IDC_FILE_NAME );
  
  CString fName =_T(" ");
  GetDlgItemTextA(IDC_FILE_NAME, fName); 
  </code></pre>