Click to See Complete Forum and Search --> : Edit Controls
MrDoomMaster
April 16th, 2005, 09:30 PM
Is there a way to determine when the enter key has been pressed while the edit control has focus? I'm simulating a chat program, a user presses 'Enter' in the edit control will erase the message so they may begin a new.
souldog
April 17th, 2005, 12:00 AM
repsond to WM_KEYDOWN and VK_ENTER in the window procedure
MrDoomMaster
April 17th, 2005, 01:27 AM
in which procedure? The parent dialog procedure, or my edit control procedure?
I forgot to mention that I'm trying to avoid subclassing my handlers...
MrDoomMaster
April 17th, 2005, 02:13 AM
repsond to WM_KEYDOWN and VK_ENTER in the window procedure
First of all I think you mean VK_RETURN.
Secondly, WM_KEYDOWN is sent for every key I press EXCEPT for the return key. Yet, WM_KEYUP is sent for the return key. I don't get this, why would the return key send a message for WM_KEYUP but not for WM_KEYDOWN?
Sahir
April 17th, 2005, 05:25 AM
This Q & A (http://msdn.microsoft.com/msdnmag/issues/0700/c/default.aspx) may shed some light.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.