[WGL][Windows] Fix exception of event-handling.