Re: I want to press Enter in CEdit box and have a function be called
- From: "Tom Serface" <tserface@xxxxxxx>
- Date: Thu, 15 Jun 2006 09:40:08 -0700
You could put in an OnOK() function in your dialog and keep track of which
control has the focus when the Enter is pressed. Then you could do whatever
you want and continue the dialog. Of course, this will take away a standard
functionality of a dialog (clicking default button when user presses Enter),
but lots of people do this sort of thing.
"Marek" <marek.krzeminski@xxxxxxxxx> wrote in message
I have created a dialog based application that has three edit fields.
I want to be able to call a function when the user presses Enter in any
of the edit boxes. For instance, when user presses Enter in edit box
1, I want to call Function1(). When user presses Enter in edit box 2,
I want to call Function2().
How do I do this?
I can't use ON_EN_UPDATE because the function that I am calling takes a
long time to process. If I use OnUpdate then for every letter the user
types, my function will run.
I don't want to use ON_EN_KILLFOCUS because I want the user to see the
results of my function after they press Enter. I don't want them to
have to go an press another button or do something else to see the
Can anyone help me?
- Prev by Date: Re: I want to press Enter in CEdit box and have a function be called
- Next by Date: Re: CString
- Previous by thread: Re: I want to press Enter in CEdit box and have a function be called
- Next by thread: Cursor move driven by timer