Hello, I am writing a very simple Win32 Console Application. My question is this: How can I start the program full screen? I know I can hit ALT+ENTER when the program is running and it will switch. I need my program to begin in full-screen though. I have heard that it is possible, but have not heard how. This is a code snippet from somewhere, but it still doesn't work. It flips full screen for a second then goes back to windowed.

BOOL fullscreen;

DEVMODE dmScreenSettings;
memset(&dmScreenSettings,0,sizeof(dmScreenSettings ));
dmScreenSettings.dmSize=sizeof(dmScreenSettings);
dmScreenSettings.dmPelsWidth=width;
dmScreenSettings.dmPelsHeight=height;
dmScreenSettings.dmBitsPerPel=bits;
dmScreenSettings.dmFields=DM_BITSPERPEL|DM_PELSWID TH|DM_PELSHEIGHT;

if (ChangeDisplaySettings(&dmScreenSettings,CDS_FULLS CREEN)!=DISP_CHANGE_SUCCESSFUL) {
if(MessageBox(NULL,"The requested fullscreen mode is not supported\nby your video card. use windowed mode instead?","HA HA!",MB_YESNO|MB_ICONEXCLAMATION)==IDYES) {
__asm int 3;
fullscreen=FALSE;
}
}