MFC r226424:
Use integer to store the result of getch(). We need to use an integer to make the comparison against ERR work.