The getch and wgetch functions refresh the specified window before fetching a character. For more information, see the scrollok function.