A simple search for
DoEvents brings up lots of results that lead, basically, to:
DoEventsis evil. Don't use it. Use threading instead.
The reasons generally cited are:
- Re-entrancy issues
- Poor performance
- Usability issues (e.g. drag/drop over a disabled window)
But some notable Win32 functions such as
DoDragDrop perform their own message processing to keep the UI responsive, just like
And yet, none of these seem to come across these issues (performance, re-entrancy, etc.).
How do they do it? How do they avoid the problems cited with
DoEvents? (Or do they?)