I have a diagnostic application that takes screenshots of IE and sends them
back to me. If IE is minimized, it finds the window and restores it by
calling ShowWindow(hWnd, SW_RESTORE );. It can then find the window's
rectangle and grab the bitmap from the screen.
However, it may take some time for the window to actually draw itself. So,
I'd like my app to wait until then to take the screenshot.
My question is, how do I know when the window is actually visible?
I've tried calling:
All of these indicate that the window is restored and at the correct size
and position right after I call ShowWindow(). But, clearly, the window is in
the middle of restoring.
I'm thinking of hooking the IE window and waiting for WM_WINDOWPOSCHANGED,
but that seems awfully complex. It seems like there should be a simpler
Any clues would be appreciated.