0

I am wondering what state a window is in during the action of minimize maximize or restore. I am not actually sure if this question even makes sense - I am quite new to win32 programming.

Basically I have an app with a timing problem where it doesn't see an office app window as visible (IsWindowVisible call) when it is in the process of going full screen or restoring down. If I can figure out if a window is in this "in between" state I can wait until it is not "in between" to see if I can use it for the purposes of my app.

thanks, A

3 Answers 3

2

When a window is - visibly - in the process of beinf animated in or out, the window is still hidden.

Window state changes are instant.If a window is set to restored, then its restored and it will be drawn in the screen restored.

The various in and out animations are animations generated by the shell. As such, they are played either before the window is shown, or after it is hidden.

The windows actual state during these animations is quite correct - the window is hidden. However there is an animation on the screen using a snapshot of the windows contents to make it look like the window is animating in or out.

1

if there is no WS_MINIMIZE or WS_MAXIMIZE then window is in normal style

edit: concerning your question: no, there is no state between WS_MINIMIZE and WS_MAXIMIZE

1

IsWindowVisible() isn't really what you want.

Try GetWindowPlacement(): "The GetWindowPlacement function retrieves the show state and the restored, minimized, and maximized positions of the specified window." It's the "show state" (actual name is showCmd).

Docs for this function: MSDN

Information on possible values of showCmd here: MSDN

Not the answer you're looking for? Browse other questions tagged or ask your own question.