title: WinAPI: How to process keyboard input in custom edit control
body: <p>So i'm creating my own edit control (multi-line textbox) in C++ using the windows API. It's going pretty well, but i'm a bit confused about one thing.</p>
  
  <p>First off, the control is being built to be able to handle unicode and all input will be converted to unicode. In other words, all input will be stored as wchar_t.</p>
  
  <p>What i'm confused about is which message to process for keyboard input. MSDN has the following window notifications:</p>
  
  <p>WM_CHAR<br>
  WM_KEYDOWN<br>
  WM_UNICHAR  </p>
  
  <p>And others, but i believe it's one of these three that i need to process. My guess would be WM_UNICHAR, but the documentation is a bit unclear about it. Also, upon looking over the VKcodes, i saw this:</p>
  
  <blockquote>
    <p>VK_PACKET<br>
    0xE7<br>
    Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT, SendInput, WM_KEYDOWN, and WM_KEYUP.</p>
  </blockquote>
  
  <p>Sorry if it's a silly question, but i just want to be sure about this.</p>