Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Unfortunately ending a program...

Posted on 2000-05-02
2
Medium Priority
?
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
MDarling earned 150 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 31

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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 learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
Suggested Courses

618 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