VC++6 Dialog Box problem

Umm, i created a Dialog based application, however, the main dialog box closes by itself whenever i press ESC or ENTER, is there any way to stop that?!
Thanks
LVL 1
narcotic030200Asked:
Who is Participating?
 
scooter1Connect With a Mentor Commented:
Handle the OK and Cancel buttons with a blank:

void CStopDlg::OnOK()
{
}

void CStopDlg::OnCancel()
{
}

This will not allow the dialog to be closed so you can create another button for that and pass CDialog::OnOK() or change the name of OK or Cancel and pass CDialog::OnOK()

Any questions let me know.


0
 
narcotic030200Author Commented:
Yes i found that out about 5 minutes after i posted the message, but i didn't know how to delete the question, thanks anyways...
0
 
scooter1Commented:
Oh well I owe you one then. :o)
0
 
narcotic030200Author Commented:
:) no prob
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.