Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to Prevent validation in KillFocus() of Edit box

Posted on 1999-07-11
3
Medium Priority
?
1,226 Views
Last Modified: 2013-11-20
I have a property sheet with 4 property pages. On one of the pages, there is an edit box whcih does some validation in its KillFocus() method. The problem is that if I put wrong enteries into that edit box and now I want to discard that changes and press Cancel button, It still validates since KillFocus() of edit box is being called when i click on Cancel button. It wont let me quit gracefully unless i feed that edit box with good food !! How do I prevent this ??
0
Comment
Question by:rupak_khurana
[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
3 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 200 total points
ID: 1309508
The validation should be done in the CPropertyPage::OnKillActive. See the MFC documentation for more information.

http://msdn.microsoft.com/library/devprods/vs6/vc++/vcmfc/_mfc_cpropertypage.3a3a.onkillactive.htm
0
 

Expert Comment

by:Extreme
ID: 1309509
At work I use OnParentNotify (using CDialogs, not prop sheets) catching the click for the button, however, I think you may want to try PreTransalteMessage.

0
 

Author Comment

by:rupak_khurana
ID: 1309510
Thanks ! thats what i was looking for
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

715 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