To set the input focus to the edit control whenever the parent window is activated, add the following statements to the window procedure:
case WM_SETFOCUS:
SetFocus (hEditWnd);
break;