Mastering the Wimp: The Wimp Poll
by Lee Calcraft

When run this program opens a window, and enters the Wimp's polling loop. All reason codes returned by Wimp_Poll are printed in the top left hand corner of the screen. Pressing the mouse buttons while the pointer is over the window results in notes being played at three different pitches. Closing the window terminates the program.

The reason codes that may be returned are:

 0 Null reason code
 1 Redraw Window
 2 Open Window
 3 Close Window
 4 Pointer Leaving Window
 5 Pointer Entering Window
 6 Mouse Button Click
17 User Message
18 User Message (Recorded)