title: CString to LPWSTR in mfc
body: <p>I am building my application in UNICODE mode and want convert CString to LPWSTR.Basically i have one one class containing CString as member variable like,</p>
  
  <pre><code>class MyClass
  {
     CString TreeNodeName;
  }
  </code></pre>
  
  <p>And i want to use following structure for inserting item into tree control,</p>
  
  <pre><code>TVINSERTSTRUCT tvInsert;
  tvInsert.hParent = ParentNode;
  tvInsert.hInsertAfter = NULL;
  tvInsert.item.mask = TVIF_TEXT;
  tvInsert.item.lParam = (long)ClassObject;
  tvInsert.item.pszText = ClassObject-&gt;TreeNodeName;  //Need this conversion
  </code></pre>
  
  <p>Please help me how to convert <strong>CString TreeNodeName;</strong> to <strong>tvInsert.item.pszText</strong> ?</p>