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
2010-10-08 03:57:27
ok Jeff. I thought this was not a normal behavior. Is it the same case for all other UI controls?
Krishnan
2010-10-08 05:09:56
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
2010-10-08 06:10:27