In my dialog-based MFC application, i have the main dialog box creating child dialog boxes. In these child dialog boxes, I have CEdit controls to enter information. I want to be able to press the enter key in these edit controls after typing information into them and call an event such as a button click (so when the user types in the edit control, they can press enter rather than use the mouse to click on the button).

Currently, pressing the enter key in a child dialog closes the dialog. What would be the best way to go about doing this?