• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 181
  • Last Modified:

Unfortunately ending a program...

We are making a Visual c++ program. But every time we accidentaly push the "enter"-button, the program ends. Why????
0
liberator
Asked:
liberator
1 Solution
 
MDarlingCommented:
I suspect you have a default button with ID IDOK - you could map this ID OnClicked event to an empty function and that would solve your problem.  Alternatively you could change the buttons ID.

regards,
Mike.
0
 
ZoppoCommented:
Hi liberator,

What kind of application is it? If it's a dialog based application simply override the dialog's OnOK() function and don't call CDialog::OnOK() in there.

ZOPPO
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now