Holy cow, I wrote a book!
A customer wanted to know how they can disable
the default fade-in/fade-out
animation that occurs when a window is hidden or shown.
"I don't want to use
WS_EX_TOOLWINDOW because that
causes my window to disappear from the taskbar.
DwmEnableComposition but that
affects the entire desktop and is too jarring.
We want to suppress the effect because our program
replaces one window with another, and we want the operation
to be invisible to the user."
Whoa, heading straight for
That's using a global solution to a local problem.
To disable the animations on a specific window,
use something like this:
HRESULT DisableDwmAnimations(HWND hwnd)
BOOL fDisable = TRUE;
Re-enabling the animations is left as an exercise for the reader.