title: Only showing one character while printing in C++
body: <p>This is my code:</p>
  
  <pre><code>auto text = new wchar_t[WCHAR_MAX];
  GetWindowTextW(hEdit, text, WCHAR_MAX);
  SetWindowTextW(hWnd, text);
  printf_s((const char *)text);
  </code></pre>
  
  <p>While printing, the char (text), it only outputs one character to the console.
  It is a WINAPI gui and a console running together. It sets the winapi title successfully and get the text successfully, but i have no idea why this is only printing out one character to the console...</p>