GetMessage Question

I'm writing a game and I want to stop updating new frame if the dialog box of active sync is about to appear.
i expect that either WM_KILLFOCUS message or WA_INACTIVE should be received before the dialog box shows up. However, the message is received after the showing of dialog box and the screen is trashed.
I wonder if someone can help me on it?
Thanks
i expect that either WM_KILLFOCUS message or WA_INACTIVE should be received before the dialog box shows up. However, the message is received after the showing of dialog box and the screen is trashed.
I wonder if someone can help me on it?
Thanks