DWMWA_USE_IMMERSIVE_DARK_MODE is for Windows 11
In MSDN :
This value is supported starting with Windows 11 Build 22000.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have followed the example here, but although I have the code, my window remains unchanged.
DWMWA_USE_IMMERSIVE_DARK_MODE is for Windows 11
In MSDN :
This value is supported starting with Windows 11 Build 22000.