Yeah, I hate it when somebody's typing in an edit box and naturally hits the "return" key and closes the dialog.
"Return" comes through to your dialog as the "OnOK" callback. If you're not handling the "OnOK" in your code (like you don't have an "OK" button displayed), you can simply provide an OnOK() handler that does nothing (do not call CDialog::OnOK())
void MyDialog::OnOK()
{
}</cr>