title: Can't change MFC Button Caption
body: <pre><code>int firstButton = IDC_BUTTON1;  
  
  for(int i = firstButton; i &lt; firstButton + 16; ++i)
  {
      CWnd *pB = GetDlgItem(i);
  
      for(int j = 0; j &lt; 16; ++j)
      {
  
          pB-&gt;SetWindowTextW((LPCTSTR)(szTest[j]));
      }
  }
  </code></pre>
  
  <p>I want to change button caption dynamically.</p>
  
  <p>when in use SetWindowTextW with static text like "static txt" it works well,</p>
  
  <p>but with char array (in this case szTest), the captions are'nt changed</p>
  
  <p>Am i coded a wrong type casting?</p>