TRUE MODE

Does everybody know how to switch screen in a true hardware fullscreen mode, like Q3 does? They say that that is more faster… Anyway, I have to do that cause I will port my programm on WindowsXPEmbedded system. Or, even worse - on Linux MESA

1)Switch screen mode

DEVMODE dm;
memset(&dm,0,sizeof(dm));
dm.dmSize=sizeof(dm);
dm.dmPelsWidth=xres;
dm.dmPelsHeight=yres;
dm.dmBitsPerPel=32;  //or 16
dm.dmFields=DM_PELSWIDTH|DM_PELSHEIGHT|DM_BITSPERPEL;
//optional:
dm.dmDisplayFrequency=85;  //or whatever
dm.dmFields|=DM_DISPLAYFREQUENCY;

int shmoo=ChangeDisplaySettings(&dm,CDS_FULLSCREEN);

2)create your window without borders or other decoration. WS_POPUP is the way to go.

3)when exiting, first destroy the rendering context, device context and window and then switch back to the original desktop resolution. The easiest and safest way to do this:

int shmoo=ChangeDisplaySettings(NULL,0);

Oh yes. Sorry, but I knew that long before. It is the first lession to my talmidim (if someone dont know, I am a teacher). When I do like that desktop still remains accessible, just press something like Ctrl+Esc…

Q3 surely do not go that way. How adout to use ChangeDisplaySettingsEX?

[This message has been edited by Azazel (edited 01-28-2004).]