Solved

VC++6 Dialog Box problem

Posted on 2000-03-03
4
200 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
[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
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
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.

739 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