Hi,
this is probably a silly question but I can't seem to find what is happening. I have an MFC app with 3 edit boxes, when you press return in any of the edit boxes it just closes the app, the cancel button is not highlighted.
Thanks.
Hi,
this is probably a silly question but I can't seem to find what is happening. I have an MFC app with 3 edit boxes, when you press return in any of the edit boxes it just closes the app, the cancel button is not highlighted.
Thanks.
Compiler == Visual C++ 6.0"Come Out Fighting."
Even though the buttons are not highlighted you have one of them set as the default button. The default behavior of the dialog box is to close on enter. So just intercept WM_CLOSE and do something different.
You are closing the dialog box because the dialog is receiving the enter key and not the edit controls. Also you will want to check Want return on the edit controls. I don't normally use this on edit controls, but you can.
Thank you, i was right it was a silly question. Thanks again for the help.
Compiler == Visual C++ 6.0"Come Out Fighting."