tags:

views:

21

answers:

1

I am using a CEdit control. And I have assigned an event handler for ON_EN_KILLFOCUS message. It gets called correctly. But the problem is that, when ever, I close the dialog box, this event handler gets called four times. How can I prevent this?

+1  A: 

Why try to prevent it? Just make sure your handler ignores the ones that don't matter -

Jeff
ok Jeff. I thought this was not a normal behavior. Is it the same case for all other UI controls?
Krishnan
Well, I have found it hard to predict when the controls will get called, so it's better to be prepared for anything, and just ignore messages if you need to -
Jeff