我在创建设备时切换到全屏模式但是当我点击窗口/屏幕的左下角时,它会最小化并返回窗口。 我该怎么办才能修复它?我刚刚开始Direct3D / WinAPI编程。它在我使用/使用的游戏中不会发生。
D3DPRESENT_PARAMETERS d3dpp;
ZeroMemory(&d3dpp, sizeof(d3dpp)); // clear out the struct for use
d3dpp.Windowed = FALSE; // program fullscreen, not windowed
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; // discard old frames
d3dpp.EnableAutoDepthStencil = TRUE;
d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
d3dpp.hDeviceWindow = MainWindowHandle; // set the window to be used by Direct3D
d3dpp.BackBufferFormat = D3DFMT_A8R8G8B8; // set the back buffer format to 32-bit
d3dpp.BackBufferWidth = 800; // set the width of the buffer
d3dpp.BackBufferHeight = 600; // set the height of the buffer
d3dpp.FullScreen_RefreshRateInHz = 0; // above 75 to make eyes happier
pd3d->CreateDevice(D3DADAPTER_DEFAULT,
D3DDEVTYPE_HAL,
MainWindowHandle,
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&d3dpp,
&pd3ddev);