https://1drv.ms/u/s!AkVRV9eGJ20rgTu13uTcNkhp0eZb?e=lwMe70
That links takes you to my OneDrive where you can download my Visual Studio 2022 solution and project (it is a .7z file of 17.7KB), it only has code to display a win32 window and little more. I also included an image that tells you my DirectX specs that the DirectX Diagnostic Tool reports. The image is the following image:
The problem is what the title says, I would like you to see if you can compile it without problems, I am afraid that it may be failing because I can't use Direct3D 11.1 (is Direct3D 11.1 a requirement? I can't find information about it), but then I tried creating the D3D device with the D3D11_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY creation flag (https://learn.microsoft.com/en-us/windows/win32/api/d3d11/ne-d3d11-d3d11_create_device_flag) just to test if I can use Direct3D 11.1 (because that flag is not supported until Direct3D 11.1) and the creation succeeded... so I don't know anymore...
When you program with DirectX make sure you always enable the "debug layer" in dev and check the output in Visual Studio's "Output" window (or other debugger output).
Check these links: Using the debug layer to debug apps and Direct3D SDK Debug Layer Tricks for more on this as the way it can be installed has changed over DirectX version and years...
This will show you why it fails:
Alpha blended swapchains must be created with CreateSwapChainForComposition, or CreateSwapChainForCoreWindow with the DXGI_SWAP_CHAIN_FLAG_FOREGROUND_LAYER flag.