Recommended Posts

for init section i do this :
///////////
PIXELFORMATDESCRIPTOR pfd;
ZeroMemory( &pfd, sizeof( pfd ) );
pfd.nSize = sizeof( pfd );
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL |
PFD_DOUBLEBUFFER;
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 24;
pfd.cDepthBits = 16;
pfd.iLayerType = PFD_MAIN_PLANE;
////////////
then i choose the Pixel Format...
////////////
nPixelFormat=ChoosePixelFormat(g_hdc,&pfd));
///////////////
and then... when i use the setpixelformat
//////////////////
SetPixelFormat(g_hdc, nPixelFormat, &pfd)
/////////////////
suddenly it returns to windows ?!?!? could you help me about this and the important thing it does this on ati cards (actually i have ge force and it works but for example on an ati card like radeon 9550 it returns to windows)
thank you ...