WASD Key Control
- In the OnKeyDown function, use a "switch-case" to detect whether
the user presses W, S, Ad, D, keys, and draw a line segment upward,
downward, leftward, rightward, respectively.
- You need to remember the current (x, y) coordinate, so that
calculating the new coordinate and LineTo should be easy.
- The question is, where should you store the (x, y) coordinate?
In OnKeyDown as static variables, or as data members of the View class?