offscreen rendering under Windows

Hello, I would like to know how to render a picture directly into a memory buffer with OpenGL without displaying it. To do this, I created a bitmap with ‘CreateDIBSection’, I chose a pixel format with arguments PFD_DRAW_TO_BITMAP, PFD_SUPPORT_OPENGL, PFD_SUPPORT_GDI, then I created a context WGL with ‘wglCreateContext’ but that doesn’t works. If someone could show me how to do that, I would be very grateful.

hope this helps.