Full screen in Windows programming
I'm making a DirectX game and have my presentation parameters set so that it is in fullscreen (d3dPP.Windowed = false;), so I think my problem is with my Windows code. I tried setting the CreateWindow function to place the window at 0,0 and screen width/height, but the window border's title bar keeps trying to pop back in for a flickering effect. Sooooo:
1) Can I disable the border or set fullscreen mode a better way?
2) Also, is there a way to grab screen width/height from Windows so I don't have to hardcode it?
I'm not a fullscreen expert so I can't really help with part 1, but I do know the answer to part 2. GetSystemMetrics with an arguement of either SM_CXSCREEN or SM_CYSCREEN will give you either the x or y dimensions, respectively.
Quote:Original post by Timptation1. You should use WS_POPUP instead of WS_OVERLAPPEDWINDOW as your window style.
I'm making a DirectX game and have my presentation parameters set so that it is in fullscreen (d3dPP.Windowed = false;), so I think my problem is with my Windows code. I tried setting the CreateWindow function to place the window at 0,0 and screen width/height, but the window border's title bar keeps trying to pop back in for a flickering effect. Sooooo:
1) Can I disable the border or set fullscreen mode a better way?
2) Also, is there a way to grab screen width/height from Windows so I don't have to hardcode it?
2. IDirect3D9::GetAdapterDisplayMode is the Direct3D way of doing it, as it'll give you the pixel format for the monitor too, and will work with multiple monitors (Where GetSystemMetrics will give you the resolution for all monitors, not just one, which is what D3D wants).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement