pixel format not supported

hi, i am just a beginner in opengl. i am using visual c++ 2005. i downloaded some code from redbook. i am getting error as “Pixel Format not supported” how to rectify?

The answer to this one really depends on what hardware you’ve got, but the simple explanation is that the code is asking for a display format that your hardware doesn’t support. Normally a best-fit fallback should be selected automatically for you, but for some reason it’s not happening.

If you post the initialization code it would be easier to point out exactly what’s causing the problem, what to change, and what to change it to.