Solved

VC++6 Dialog Box problem

Posted on 2000-03-03
4
196 Views
Last Modified: 2010-04-02
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
0
Comment
Question by:narcotic030200
  • 2
  • 2
4 Comments
 

Accepted Solution

by:
scooter1 earned 25 total points
ID: 2582325
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
 
LVL 1

Author Comment

by:narcotic030200
ID: 2582453
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
 

Expert Comment

by:scooter1
ID: 2582467
Oh well I owe you one then. :o)
0
 
LVL 1

Author Comment

by:narcotic030200
ID: 2582471
:) no prob
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

840 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