I am trapping EN_KILLFOCUS and EN_SETFOCUS to change the
values in an entry field when a user enters or leaves an
edit field.
When the user enters, they may enter 500, when they exit,
I replace that with $5.00. When they come back to it
again, I replace it with 500, for ease of editing.
The problem:
For some fields I try to prevent the user from leaving
the field if they put in an invalid value, such as a 'K'
in a field that should be 'W' or 'L'. I do a 'beep', do
an EM_SETSEL, and a SetFocus back to that field. What I
am seeing, is that the next field, which would've
received the focus, receives an EN_KILLFOCUS, without
getting an EN_SETFOCUS first. Any ideas on how I can
deal with this situation? Why does it get the
EN_KILLFOCUS, if it never receives the EN_SETFOCUS.
Thanks,
Don