The Phantom Bug: Why doesn't MessageBox work from my WM_NCDESTROY handler?
Adrian McCarthy ran into a problem where
MessageBox didn’t work when called from a
WM_NCDESTROY handler. You already know how to solve this; you just have to connect the dots. See if you can do it on your own before the answer is revealed.