PDA

View Full Version : CDS_FULLSCREEN?



01-31-2004, 05:17 PM
Hey. I got a prob. I have still not gotten passed the first opengl tut over at nehe. Everytime i try to compile there is an error saying that "CDS_FULLSCREEN" is undeclared.

"153 a:\lesson01\lesson1.cpp
`CDS_FULLSCREEN' undeclared (first use this function)(Each undeclared identifier is reported only for each function it appears in.)"

and this is what it looks like in the code...



if (ChangeDisplaySettings(&dmScreenSettings,CDS_FULLS CREEN)!=DISP_CHANGE_SUCCESSFUL)

i even tried downloading the code from nehe for devc++ and tried compiling but i still got the same error. so it must be the code or the compiler but it happend in to differnt compilers....

thanks for any help i can get

zeckensack
02-01-2004, 02:00 AM
CDS_FULLSCREEN is defined in winuser.h, which automatically gets included if you include windows.h.

You apparently did, because otherwise ChangeDisplaySettings itself would be undefined and cause an error.

Do not include winuser.h directly. Instead, try to get up-to-date headers for your compiler. You appear to be using MingW. I could successfully compile code similar to yours with DevCPP/MingW-GCC3.2. I'd suggest trying that. Grab it here (http://www.bloodshed.net/dev/devcpp.html) .

If you're just using MingW/GCC, and not DevCPP, you need to check for new versions here (http://mingw.sourceforge.net/download.shtml#hdr2) , obviously.

oGL_nEwB
02-01-2004, 02:03 PM
Hey thanks man. I'm gonna dl it now.