Original Post
I'm working on a 3d editor in C#, drawing mostly on ideas from a DX editor I wrote in C++. I want to have multiple viewports open at once, up to 4. I have created a View3D class derived from Windows.Forms.Control. I'm trying to create the device without attaching it to any window (passing in null for the window), and just creating a small primary swapchain that I never use to present data. My design is to create a secondary swap chain for each View3D. But I can't create the device without passing in a window handle (or control reference). The DX help says I can do that, as long as I pass in a window during the present call. But I keep getting InvalidCallException during the Device constructor. I had it sort of working when I had the control check to see if there was a valid device and create it if it wasn't. That control would then use the default swapchain from the device. I had some problems keeping track whether a View3D was using the primary swapchain or not so I'm trying this other way. Anyone done anything like this? Any help/suggestions would be appreciated. Paul p.s. I'm still using June SDK, for various reasons. I'm still using VS.NET 2003 also.