Click to See Complete Forum and Search --> : Catching the enter Key


April 29th, 1999, 08:04 PM
Hi
I want to know everytime the user presses the enter key in my view class
Can anybody help me?
Thanks

Troy T
April 30th, 1999, 03:33 AM
Override the "PreTranslateMessage" function for the view class. In that function, enter the following code:

if( pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_ENTER )
{
return TRUE;
}

I don't remember if it's return TRUE or FALSE. Play with that value to see which one works, but the other code I'm positive about.. :)

Good luck..

- Troy