I'm trying to create an OpenGL window wrapper class and ChoosePixelFormat is giving me on heck of time. In the attached code (OpenGLWindow.cpp, OpenGLWindow::CreateOGLWindow() ), I create my base window, get an HDC, fill out the pixel format description struct and send it off to ChoosePixelFormat. However, ChoosePixelFormat just returns 0 and GetLastError returns 126 (which is module not found or some such). The thing is that I can use any PFD and this happens (including PFDs from tutorial code I've downloaded and successfully compiled and executed). Does anyone here have any ideas (I've two forums at gamedev, but no luck)?
Secondly, and far less important, is it possible for me to modify my BaseWindow class (also in the attach zip file) to be used for creating more than one window? IE making one instance of the window class (as shown in WinMain) will create a perfectly good window, but adding a second instance fails as RegisterWindowEx fails. Like I said, its not important but could be useful down the line.
Just for FYI, this code is the base of OpenFlight/OpenSceneGraph viewer.
Thanks,
Arrow