Solved

Unfortunately ending a program...

Posted on 2000-05-02
2
173 Views
Last Modified: 2010-04-02
We are making a Visual c++ program. But every time we accidentaly push the "enter"-button, the program ends. Why????
0
Comment
Question by:liberator
2 Comments
 
LVL 3

Accepted Solution

by:
MDarling earned 50 total points
ID: 2768964
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
 
LVL 30

Expert Comment

by:Zoppo
ID: 2768970
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 your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now