Rajeev Khatri:So you mean that we cant use swap chain for rendering multiple windows.
Just the opposite. You
can use a swap chain for rendering to multiple windows. You can use either the default swap chain on the device, a single additional swap chain for all windows (ignoring the default swap chain on the device), or you can use any number of swap chains for any number of windows and they don't need to be matched one to one. The point is that the Present method, either on the IDirect3DDevice9 interface or on the IDirect3DSwapChain9 interface, takes an HWND argument that is used as the target of the presentation if you specify something other than zero.
Can you tell me any other way for rendering multiple windows.
Create a device with a back buffer that is as large as the largest window you need to draw. Whenever you need to draw a window, set the viewport on the back buffer to the size of the window. Clear the viewport and draw into it. Call Present on the device with the handle of the window that needs to be drawn and the pSourceRect parameter pointing to a rectangle that is the size of the window.
Poof.
You can now redraw as many windows as you like with a single back buffer. No extra swap chains needed. Even better still, you'll end up with more video memory left over for your textures and other resources because you're sharing a single back buffer between all the windows instead of giving each window its own back buffer.
Relevant link to Device.Present overload from SlimDX documentation:
http://tinyurl.com/m4fb58
A similar overload of Present is provided for the SwapChain class in SlimDX.