The DwmSetWindowAttribute function can help you. It allows you to change several window attributes associated with DWM. In particular, the DWMWA_TRANSITIONS_FORCEDISABLED attribute mentions βEnable or DWMWA_TRANSITIONS_FORCEDISABLED Disable DWM Transitions,β which might just do the trick.
HRESULT hr = S_OK; LPCVOID dwAttribute = (LPCVOID)TRUE; hr = DwmSetWindowAttribute(hWnd, DWMWA_TRANSITIONS_FORCEDISABLED, &dwAttribute, sizeof(dwAttribute)); if (SUCCEEDED(hr)) {
source share