OpenGL and DDB ?????

how can I draw Opengl to DDB Bitmap in windows API?
i try like this:

hdc = GetDC(hWnd);
GlPlane.hdcMem = CreateCompatibleDC(hdc);
GlPlane.hBitmap = CreateCompatibleBitmap(hdc,cxClient,cyClient);
SelectObject(GlPlane.hdcMem,GlPlane.hBitmap);
hrc = wglCreateContext(GlPlane.hdcMem);
wglMakeCurrent(GlPlane.hdcMem,hrc);
ReleaseDC(hWnd,hdc);

it doesn’t work
but what is wrong???

Hi,
Use CreateDIBSection and use compatable DC with 0.

DPS

[This message has been edited by dpsv (edited 01-20-2002).]