   Windowed direct 3D output on top of GDI GUI elements ?
  Hi,  I'm trying to send some direct3d output to a window. This works as long as there are no GDI elements like buttons, panels etc. in it. As soon as I add these GDI elements, they stay on top of the direct3d output obscuring it.I would like to cradle the direct3d output inside a panel, but I can't get the output on top of the panel. The direct3d output is always obscured by the panel.Does anyone know of a way to mix direct3d output and GDI like this ? Most threads seem to deal with the opposite problem : getting GDI elements to stay on top of direct3d output...I'm using Windows 7.Thx,EBrarian   
  What language?It boils down to setting the panel as ownerdraw (use the Paint event with .NET Forms and set all rendering to happen in OnPaint) and do the rendering inside the controls WM_PAINT event.;  Hi Endurion,  I'm using Delphi 2009. Unfortunately rendering in the OnPaint event doesn't work, the surface remains empty. Also, the display needs to be updated continuously and the onpaint event only occurs when the window needs repainting.Currently I have a separate rendering thread running to continuously update the display which I doubt is possible from the paint event.The direct3d output is only visible on the unused part of the window, but as soon as I add GDI controls that part of the image is obscured by the control.Perhaps there is a way to access the 'background' image of the form or something like that ?I'm not at all sure how the direct3d output and the window are 'related' to eachother, all I do is call direct3d 'present' method passing the window handle to override where the output is sent to.I tried restricting the output using a viewport but the entire background is still cleared to black anyway, only the rendered objects are restricted to the viewport.Any ideas ?Regards,Ebrarian   ;  Ah never mind, I solved it.You can actually pass the handle of a window control such as a panel to the present method instead of the window handle itselfThe output is then restricted to that control :)   