I am trying to associate events to a field on a form.
The events are:
Entry
Leave
Data Entered
Data Changed
Is there already a way to detect these events? I thought I could use the hControl value but
have had no luck.
What I would like to do is
On leave of field {
do stuff
}
On entry of field {
do stuff
}
On value-changed of field {
do stuff
}
Any ideas?
If you mean you want to detect things in an edit control, you can use:
ENSETFOCUS (control got focus)
ENKILLFOCUS (control lost focus)
ENCHANGE (data has changed)
ENUPDATE(control about to update)
dlg::OnControl(int nID, int nNotifyCode, unsigned int hControl),int
{
ÂÃ, Ã‚Ã, select nID
ÂÃ, Ã‚Ã, {
ÂÃ, Ã‚Ã, Ã‚Ã, case EditControl_1:
ÂÃ, Ã‚Ã, Ã‚Ã, Ã‚Ã, Ã‚Ã, if (nNotifyCode == ENKILLFOCUS)
ÂÃ, Ã‚Ã, Ã‚Ã, Ã‚Ã, Ã‚Ã, Ã‚Ã, // control lost focus
ÂÃ, Ã‚Ã, }
}
If this is not what you were looking for, it still may be useful for someone elseÂÃ, ;)