title: How to turn off beeping when pressing ENTER on a single-line EDIT control under Windows CE?
body: <p>I'm developing an application targeted to a POCKET PC 2003 (Windows CE 4.2) device using C++ and native WINAPI (i.e. no MFC or the like). In it I have a single-line edit control which part of the main window (<em>not</em> a dialog); hence the normal behaviour of Windows when pressing ENTER is to do nothing but beep.</p>
  
  <p>I've subclassed the window procedure for the edit control to override the default behaviour using the following code:</p>
  
  <pre><code>
  LRESULT CALLBACK Gui::ItemIdInputProc( HWND hwnd, UINT message, WPARAM wParam,
      LPARAM lParam ) {
  
      switch ( message ) {
          case WM_KEYDOWN :
              switch ( wParam ) {
                  case VK_RETURN :
                      addNewItem();
                      return 0;
              }
      }
  
      return CallWindowProc( oldItemIdInputProc_, hwnd, message, wParam, lParam );
  }
  </code></pre>
  
  <p>This causes the equivalent behaviour as pressing the 'OK' button.</p>
  
  <p>Now to the problem at hand: this window procedure does not override the default behaviour of making a beep. I suspect that there must be some other message or messages which are triggered as ENTER is pressed that I fail to capture; I just can't figure out which. I really want to stop the device from beeping as it messes up other sounds that are played in certain circumstances when an item collision occurs, and it is crucial that the user is alerted about that.</p>
  
  <p>Thanks in advance.</p>