Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VC++6 Dialog Box problem

Posted on 2000-03-03
4
Medium Priority
?
207 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 100 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
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.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

916 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