Fullscreen w/o exclusive mode

Started by
4 comments, last by dword2002 22 years, 1 month ago
I would like to know how it is possible to change the desktop resolution without being in exclusive mode. Civilisation III (Infogrames Interactive) does it very well using OpenGL. Is it possible to achieve the same think with DirectX Graphics? I want to avoid using ChangeDisplaySettingsEx()win32 api. Is it possible to change the screen resolution using DirectDraw, not restore the old mode, start game, and after it is done, restore the old mode ? Thank you for your help. DworD
DworD
Advertisement
They (you) could use a maximized desktop window that lacks all the relevant windows styles (WS_BORDER, WS_SYSMENU etc).

quote:Original post by dword2002
I would like to know how it is possible to change the
desktop resolution without being in exclusive mode.
Civilisation III (Infogrames Interactive) does it very
well using OpenGL. Is it possible to achieve the same
think with DirectX Graphics? I want to avoid using ChangeDisplaySettingsEx()win32 api. Is it possible to change the screen resolution using DirectDraw, not restore the old mode, start game, and after it is done, restore the old mode ?
Thank you for your help.

DworD


The function is called ChangeDisplaySettings(Ex)().

Use EnumDisplaySettings() with iModeNum set to ENUM_CURRENT_SETTINGS to get the current display-mode, so you can reset the mode bevore quitting your app.
Windows does not do this for you, AND the resolution can be changed by other programs while yours is running.

But thats the way the OGL apps do it, afaik.

bye,


--- foobar
We push more polygons before breakfast than most people do in a day
--- foobarWe push more polygons before breakfast than most people do in a day
*True* fullscreen mode has to be exclusive.
And Unless Microsoft has changed any oftheir happy little games, your stuck with it.Patrick Nortin ~TechTV''s "The ScreenSavers"~
As eRAZOR mentioned, you can emulate fullscreen view without changing the display mode. If you use CreateWindowEx with the ExStyle (first parameter) being WS_EX_APPWINDOW and the Style (fourth parameter) being WS_VISIBLE | WS_POPUP, then the window will be without a titlebar or a border or anything. So you can simply center it and set its width and height as the desktop dimensions (GetSystemMetrics(SM_CXSCREEN) and GetSystemMetrics(SM_CYSCREEN)).

~CGameProgrammer( );

~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
Thank you very much for all your answers. I used a combination of both solutions. Foobar gave me the good solution: ChangeDisplaySettingsEx. There is a parameter CDS_FULLSCREEN that does the job very well. Then I use the eRAZOR solution to remove all “windows flavour” styles. Then I use a d3d window. I have both the advantages of full screen (better player immersion) and windowed mode (much, much more easy to debug!). Thank you again!

DworD
DworD

This topic is closed to new replies.

Advertisement