Grabbing the content from one window and pasting it as a texture

What I am looking to do is take a snapshot of a web browser window and paste the bit map onto the surface of a figure inside the opengl window. What i specifically need help in is grabbing the content from a web browser while the browser is not in the foreground so it looks like the content is just on the object inside the opengl window. Has anybody seen anything like this before or know of a good aproach to this?


this is win32 specific code, go to and you’ll find a lot of useful things.
For the OpenGL related code, I think this is only a simple texturing question, and you’ll find answers here :


One possibility is you could try using the WebBrowser control instead of a browser. Since it is an ActiveX control, you should be able to send it a WM_PAINT message with the wParam set to be a Memory DC. It should then draw to the bitmap inside the Memory DC