How to detect that someone has pressed ENTER on listbox or CEditview both?
Hello I just wann know that how this is possible to know that some one has pressed eneter button after writing some text in :
CEditView and Textbox...
Suggest
Thanking you
Sandeep
Re: How to detect that someone has pressed ENTER on listbox or CEditview both?
You should be able to handle the WM_CHAR (OnChar) event and check for enter.
Phil
Re: How to detect that someone has pressed ENTER on listbox or CEditview both?
Hi thanks,
I am just curious to know that I am having three views i.e. CMyView, CListView and CEditView.
Now i am adding text to CEditview. So where should I add WM_CHAR handler. As I am not doing any thing with my CMyView..
Suggest..
Re: How to detect that someone has pressed ENTER on listbox or CEditview both?
Whatever control has focus and is being typed in will be the control class that you want to detect WM_CHAR. If you want to detect the enter key from multiple controls, you will need multiple handlers for each control class.
Phil
Re: How to detect that someone has pressed ENTER on listbox or CEditview both?
Hello,
Depending on what you want to get, there are different methodologies. If you want to know whether selection is changed or data modified in the listbox/combobox, you can sabe the previous selection / data in memory and check whether they are changed.
Regards.
Pravin.
17-07-2005.