Archived

This topic is now archived and is closed to further replies.

dword2002

Fullscreen w/o exclusive mode

Recommended Posts

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

Share this post


Link to post
Share on other sites
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



Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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( );

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites