Hello, I am a beginner in opengl…
I have to display the result in full screen.
I have search for “ChangeDisplaySettings()”
but none of them answer how to fill the
I am newbie to opengl and an beginner to mfc
(or win32) as well.
Can anybody give me a simple example on how to fill DEVMODE parameter?
Help please…I am stuck for long hours over full screen…
Maybe this code would help you
DEVMODE dmScreenSettings; //acess for the struct
//INIT THE FULLSCREEN
memset(&dmScreenSettings, 0, sizeof(dmScreenSettings)); dmScreenSettings.dmSize = sizeof(DEVMODE);
dmScreenSettings.dmPelsWidth = SCREEN_WIDTH;
dmScreenSettings.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT;
Other usefull fields are dmBitsPerPel (colordepth) and dmFrequency (refresh rate). Just make sure you or in DM_BITSPERPEL and/or DM_FREQUENCY.
Great!Fast and excellent response…
Furthermore, I am using MFC with mulitple document.
In which position should i place this code
in fact, i have tried to put those
inside onpaint. But that the screen area outside the window is
it seems that there are some other code reset
to original window size …
Can you help please…?
Do you have tried to use SwapBuffer(hDC);
maybe that would help to solve your Problem