Problem with event processing on win32 -- hang when moving app window

I needed to do something similar, I outlined my solution in this thread: