First draft for event trapping on Windows.