title: how to get Selected treeview item text
body: <p>I'm using WINAPI Treeview to show some data.
  I have to get the selected TV_ITEM text, when I select a TV ITEM.
  I'm using following code</p>
  
  <pre><code>case WM_NOTIFY:
   switch( ((LPNMHDR)lParam)-&gt;code)
   {
   case TVN_SELCHANGED:
    {
           NMTREEVIEW* pnmtv = (LPNMTREEVIEW)lParam;
           LPTSTR str = (pnmtv-&gt;itemNew.pszText);
           MessageBox( hWnd, str,"load",MB_OK );
    }
    break;                        
  }
  </code></pre>
  
  <p>I can't get the correct value, I got some kind of garbage value.
  MessageBox shows some kind of special characters(Those are not in keyboard)</p>
  
  <p>Shall anyone help me, how to get the selected item text.
  Thanks in advance</p>