title: SendMessage c++
body: <p>i was making a program and i need a functiong SendMessage to simulate a key press in a game window, but i don't understood how i can use this function:</p>
  
  <pre><code>#include &lt;Windows.h&gt;
  #include &lt;iostream&gt;
  
  int main()
  {
          HWND hWnd = FindWindow(NULL,"Game");
          HWND edit = FindWindowEx(hWnd, NULL, "Edit", NULL);
          SendMessage(edit, WM_CHAR, (TCHAR) 'H', 0);
          SendMessage(edit, WM_CHAR, (TCHAR) 'L', 0);
          SendMessage(edit, WM_CHAR, (TCHAR) 'O', 0);
  }
  </code></pre>
  
  <p>in "Game" and "Edit" there are this error :</p>
  
  <pre><code>Error: l'argomento di tipo "const char *" è incompatibile con il parametro di tipo "LPCWSTR"
  </code></pre>