Link to home
Start Free TrialLog in
Avatar of rupak_khurana
rupak_khurana

asked on

How to Prevent validation in KillFocus() of Edit box

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 ??
ASKER CERTIFIED SOLUTION
Avatar of chensu
chensu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Extreme
Extreme

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.

Avatar of rupak_khurana

ASKER

Thanks ! thats what i was looking for