Here I have part of an OPENGL program that ultimately shows a triangle rotating...that isn't important. What is important is the three errors I get in the block of following code...btw, it is for creating a fullscreen window:
If you know any opengl the code should be easy to understand...my three errors are:Code://fullscreen stuff needs to be done before the window is created otherwise weird things can happen!!!! DEVMODE devModeScreen; memset(&devModeScreen, 0, sizeof(devModeScreen)); devModeScreen.dmSize = sizeof(devModeScreen); devModeScreen.dmPelsWidth = 1024; //You are supposed to use the same width and height in the DEVMODE devModeScreen.dmPelsHeight = 768; //datastructure as when you actually create the window devModeScreen.dmBitsPerPel = 16; //This should probably be the same...currently my system is running in 16bbp //so it seemed like a good idea to use 16 devModeScreen.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL; if(ChangeDisplaySettings(&devModeScreen, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL) fullScreen = false; if(fullScreen) { extendedWindowStyle = WS_EX_APPWINDOW; windowStyle = WS_POPUP; ShowCursor(false); } else { extendedWindowStyle = NULL; windowStyle = WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_SYSMENU | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; } hwnd = CreateWindowEx(NULL, //window creation "MyClass", "The OPENGL windows application", WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_SYSMENU | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, 100, 100, 1024, 768, NULL, NULL, hInstance, NULL);
--------------------Configuration: opengl - Win32 Debug--------------------
Compiling...
main.cpp
C:\WINDOWS\Desktop\opengl\main.cpp(133) : error C2065: 'extendedWindowStyle' : undeclared identifier
C:\WINDOWS\Desktop\opengl\main.cpp(134) : error C2065: 'windowStyle' : undeclared identifier
Error executing cl.exe.
opengl.exe - 2 error(s), 0 warning(s)
well what do you know, only two errors, hot dog!
Thanks if you can explain what I did wrong.



LinkBack URL
About LinkBacks



I always switch to fullscreen after I've created the window