As written in the title, how?
I thought that DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH
in DXGI_SWAP_CHAIN_DESC::flags
was responsible about this, but even when I set DXGI_SWAP_CHAIN_DESC::flags
to 0
, the switching doesn't disable.
According to @Simon Mourier, I should have used IDXGIFactory::MakeWindowAssociation. And to disable MessageBeep, I should have used WM_MENUCHAR and returned MNC_CLOSE << 16 when it occurs.