title: Wrong symbols in the buffer using GetWindowText
body: <p>There is combo box with two items and button on the main window. Combobox:</p>
  
  <pre><code>HWND hCombo;
  hCombo = CreateWindow(L"COMBOBOX", L"combobox",
         WS_CHILD | WS_VISIBLE | CBS_SORT | CBS_DROPDOWNLIST,
         10, 55, 232, 500, hWnd, 0, hInstance, 0);
  
  const wchar_t *langEnglish = L"English";
  const wchar_t *langRussian = L"Russian";
  SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM)langEnglish);
  SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM)langRussian);
  SendMessage(hCombo, CB_SETCURSEL, 0, 0);
  </code></pre>
  
  <p>I am trying to get selected item text in the <strong>WndProc</strong> by clicking on the button:</p>
  
  <pre><code>case WM_COMMAND:                                            
  {
      switch(LOWORD(wParam))
      {  
          case IDC_BUTTON_OK:
              wchar_t buf[10];
              hCombo = GetDlgItem(hWnd, IDC_COMBO);
              GetDlgItemText(hCombo, IDC_COMBO, (LPWSTR)buf, 10);
              MessageBox(hWnd, (LPCWSTR)buf, NULL, MB_OK);
              break;
      }
  
  } break;
  </code></pre>
  
  <p>I am using breakpoint in the MSVS2010 to see <strong>buf</strong> variable. It contains <strong>chinese</strong> symbols!!! Message box shows <em>empty</em> message (With the title "<strong>Error</strong>"). I want to see english text. What is wrong? </p>
  
  <p>This code</p>
  
  <pre><code>nIndex = SendMessage(hCombo, CB_GETCURSEL, 0, 0);
  SendMessage(hCombo, CB_GETLBTEXT, nIndex, (LPARAM)buf);
  </code></pre>
  
  <p>fills <strong>buf</strong> with the same chinese symbols</p>
  
  <p><strong>SOLUTION:</strong> <br />
  hCombo = CreateWindow(L"COMBOBOX", L"combobox",
         WS_CHILD | WS_VISIBLE | CBS_SORT | CBS_DROPDOWNLIST,
         10, 55, 232, 500, hWnd, <strong>(HMENU)IDC_COMBO</strong>, hInstance, 0);</p>