# How to render IDirect3DSurface9 in my window?

I have some code that captures the screen and save data into a surface.

g_pDirect3D_Device->GetFrontBufferData(0, pSurface);


All is ok, now I want to display pSurface in my window. I want to have the image in my whole window.

Is it possible, or should I use a texture?

• I have very little knowledge in DirectX, but couldn't you create a RenderTarget from the surface, and then draw [to] the RenderTarget? Mar 20 '16 at 23:40