title: How to convert CString to wchar_t
body: <p>Any one can help to convert <code>CString</code> to <code>wchar_t</code>?</p>
  
  <pre><code>String csFileName = "";
  
  csFileName.Format("D:\\test\\test %d.jpg", nFile); nFile += 1;
  
  
  wchar_t *messageArray = static_cast&lt; wchar_t *&gt;(csFileName); wchar_t
  firstCharacter = csFileName[0]; ImageFileParams.pwchFileName =
  (wchar_t *)(&amp;csFileName);
  </code></pre>