What is the message I have to proccess in DialogProc to detect an <ENTER> in a EDIT control?
VK_RETURN will trap the enter key but if the edit control has focus and the ES_MULTILINE style then you don't need it, The enter key will create a new line.
Peter.
I need to do something when the user press <enter> in a single line EDIT control.
I haven't receive VK_RETURN messages in the dialog proc (note that I use the dialog as a main window, created with:
Invoke DialogBoxParam, eax, IDD_SMS, NULL, Addr DialogProc, NULL )
If focus was on say a button in a dialog proc then enter would be the equivalent of pushing it. If the focus was on a single line edit control (without actually testing it) I should imagine that nothing would happen!
You could trap the enter Key with something like:
.elseif uMsg==WM_KEYDOWN
mov eax, wParam
.if eax==VK_RETURN
invoke SendMessage, do something
But that would probably mess with the tab system that is controlled by windows in a dialog proc.
You might have to find out first whether the focus is set to that particular edit control.
Peter.
I think you have to subclass it; look up Iczelion's tutorial.
Quote from: AeroASM on March 10, 2005, 02:08:50 PM
I think you have to subclass it; look up Iczelion's tutorial.
thanks AeroASM, Tutorial 22: Superclassing is where I need