title: using StringCchPrintf to build string from substring
body: <p>I'm trying to build a string from a substring which comes from an error message:</p>
  
  <pre><code>// the error message
  const char* error_msg = e.what();
  
  size_t const cchDest = 100;
  TCHAR pszDest[cchDest]; 
  
  LPCTSTR pszFormat = TEXT("%s %s");
  TCHAR* pszTxt = TEXT("The error is: ");
  
  HRESULT hr = StringCchPrintf(pszDest, cchDest, pszFormat, pszTxt, error_msg );
  </code></pre>
  
  <p>I was hoping that the second <code>%s</code> will be replaced with the value of <code>error_msg</code>, however the output is:</p>
  
  <p><code>The error is: ☐☐a</code></p>
  
  <p>How do I have to modify above code so that the substring shows up?</p>
  
  <p><strong>EDIT1</strong>
  I've also tried the following, but all I get is a box again.</p>
  
  <pre><code>TCHAR* pszTxt = TEXT("The error is: %c", error_msg );
  HRESULT hr = StringCchPrintf(pszDest, cchDest, pszTxt);
  </code></pre>