How to minimize or restore an external application with the correct animation effect in Vista / Win7?

I am writing an application that can minimize or restore other windows of external applications. However, when I do this, windows usually just collapse or restore directly, without the zoom / smoothing animation effect that you usually see. Or, in some cases, minimization will cause the window to disappear, but not collapse.

I tried sending or sending WM_SYSCOMMAND messages with SC_MINIMIZE or SC_RESTORE, calling ShowWindow, trying to use AnimateWindow or even SetWindowPlacement. None of them seem to give the correct animated result. It seems to me that I have not read about the API API for a long time, which took two rectangles and performed an animation of scaling / smoothing from one to another. If so, then I can’t remember what the API is or find it on MSDN.

Does anyone know how to do this? Thank!

+3
source share

Source: https://habr.com/ru/post/1762012/


All Articles