In my application I have three edit box and a submit button I am executing some code on submit button click but I also want that if I 'll press the enter key that code should also execute.my code is-
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDC_MAIN_BUTTON:
{
SendMessage(h_Name,WM_GETTEXT,sizeof(CName)/sizeof(CName[0]),reinterpret_cast<LPARAM>(CName));
SendMessage(h_Email,WM_GETTEXT,sizeof(CName)/sizeof(CEmail[0]),reinterpret_cast<LPARAM>(CEmail));
SendMessage(h_Phone,WM_GETTEXT,sizeof(CPhone)/sizeof(CPhone[0]),reinterpret_cast<LPARAM>(CPhone));
i = 1;
EnableWindow( GetDlgItem(hwnd, IDC_MAIN_BUTTON),false);
EnableWindow( GetDlgItem(hwnd, IDC_CLEAR_BUTTON),false);
ShowWindow(GetDlgItem(hwnd, 3), SW_SHOW);
SendMessage( hwndPrgBar, PBM_SETPOS, 0, 0 );
SetTimer(hwnd, ID_TIMER, 10, NULL);
}
break;
so please now tell me that how this code will also execute on enter key press