title: Getting text from an EDIT control using WinAPI
body: <p>So basically I'm trying get text from text field, as I understand you get pointer from <strong><em>GetWindowText</em></strong> am I right? I couldn't place that text into long char so I had to use int and message box doesn't take ints so I had to transform into long char and then reverse pointer(&amp;)? to display the text in a message box and that just printed me a bunch of nonsense  </p>
  
  <p><strong>case WM_CREATE:</strong></p>
  
  <pre><code>textbox1 = CreateWindow(L"EDIT",
              L"X0", WS_BORDER | WS_CHILD | WS_VISIBLE,
              50, 120, 50, 20,
              hwnd, NULL, NULL, NULL);
  </code></pre>
  
  <p><strong>case WM_COMMAND:</strong></p>
  
  <pre><code>case 111:{          
  TCHAR buff[1024];
  int text = GetWindowText(textbox1, buff, 1024); 
  TCHAR  textS = (TCHAR)text;
  MessageBox(hwnd, &amp;textS, &amp;textS, MB_OKCANCEL | MB_ICONEXCLAMATION);}
  </code></pre>