Choosing pixel format after Direct Draw

Hi, All!

I’ve got a problem. I need that my prog work on full screen in different resolution, so : I create window; switch video mode by using Direct Draw on needed resolution; get window DC by GetDC; ChoosePixelFormat and so on. On Windows 98 this way works perfectly and I can get OpenGL even on 300x200 on fullscreen.
But on Windows 2000 when I try ChoosePixelFormat for DC that I get from GetDC program has crashed.

What happend? Can I avoid it? How I can do this?

Mayday, Mayday!! Please respond anybody!!!

Yours, Mad Max.

Perhaps you shouldn’t stick with DirectX…
Just use ChangeDisplaySettings / EnumDisplaySettings to change to your screen mode. That’s working fine for me.