   TPanel and Direct3D
  Does any one have an example BCB 5 Pro (or under) application using DirectX 7 were it uses a TPanel to render on?I need to render a world on a panel but I am not sure how to do it .  
  Hmm. To do this, I would have to dig into my d3d dx7 code. but I remember it something like this: when you blt (in windowed from back -> front buffer) the blt in absolute coords. In other works, the coords are from the top left coords in the whole screen. Use the main form''s left and top properties (of course!) and add on the left+top coords of the TPanel for the blt coordinates. You will have to use the ''proper'' blt function, tho''. Since the TPanel might not be in correct size -> the screen size (directx front buffer). You would setup the TRects properly... Dig into the DX7 docs for Blt. That should get the thing working...Wait! Remember, you need to set the hdc for the clipper to the hdc of the TPanel, or else it will not clip properly. I think. ------------------------------ BCB DX Library - RAD C++ Game development for BCB ;  I''m not quite sure that this works in BCB... but in delphi I just when creating DirectX interfaces I would set the handle to panels handle. That works at least in Delphi. Pekka Heikurapekka@heikura.comhttp://bnet.webprovider.com  