title: detect typing in an edit control
body: <p><strong>Edit:</strong> Nevermind! the code below doesn't work but when I copy and paste it from the website, it works fine. </p>
  
  <p>I tried what <a href="http://www.apitalk.com/windows-Programming/Create-A-Textbox-And-Track-Change-Event-In-Winapi.html" rel="nofollow"><strong>this</strong></a> website told me but it didn't work. Anywhay, probably doing something pretty nooby.</p>
  
  <pre><code>int editid = 5654;
  HWND edit;
  
  //int WINAPI wWinMain
  WNDCLASS wc;
  wc.lpfnWndProc = WindowProc;
  wc.lpszClassName = L"class name";
  
  
  
  
      HWND hwnd = CreateWindowEx(
      0,
      L"Class name",
      L"Copy N Paste",
      WS_OVERLAPPEDWINDOW | WS_THICKFRAME | WS_VISIBLE,
      CW_USEDEFAULT, 10,
      885, 484,
      NULL,
      NULL,
      hInstance,
      NULL
      );
  
  
  
  edit = CreateWindowEx(
      0,
      L"EDIT",
      NULL,
      WS_CHILD | WS_VISIBLE |  ES_LEFT,
      20, 12,
      480, 22,
      hwnd,
      (HMENU)editid,
      hInstance,
      NULL
  );
  
  // LRESULT CALLBACK WindowProc
  switch(uMsg) {
  case WM_COMMAND:
      if(HIWORD(wParam) == EN_CHANGE &amp;&amp; LOWORD(wParam)==editid) { // this is
          //supposed to detect a change event in the edit control
          MessageBox(0, L"Doesnt Work!", L"failure", 0);
      }
  }
  </code></pre>