while((Win32::GUI::DoEvents() != -1) { } [download]
In reply to how to proper leave a Win32::GUI::DoEvents() while loop ? by cbrauner