8.5.5 Adding a WM_SETFOCUS Case

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;