DirectX rendered inside a control?

P

PJ6

I'm asking this question here because the support in the DirectX forums is
virtually non-existant. If anyone can suggest where else I can post this
with better results, please let me know...

DirectX uses a completely different paradigm than what I'm used to painting
forms normally with GDI+. From what I can tell, you cannot have a "DirectX
control", but rather you have to pass a handle to an entire form, and then
the rendering is done on the form itself. My first tries have lead me to
beileve that I just can't incoprorate hardware-accelerated rendering into an
application with other windows controls, especially not if I want the render
area to be contained in a panel or other control. If this is true DirectX
would seem to be a completely unworkable tool to use in standard WinForms
applications.

Anyone want to share their own points of view, experiences using DirectX in
non-gaming applications?

TIA,
Paul

P.S. I'm using the version 10 SDK
 
C

cSharpLess

"PJ6" <[email protected]> kirjoitti
viestissä:uoL$c%[email protected]...

DirectX uses a completely different paradigm than what I'm used to
painting forms normally with GDI+. From what I can tell, you cannot have a
"DirectX control", but rather you have to pass a handle to an entire form,
and then the rendering is done on the form itself. My first tries have
lead me to beileve that I just can't incoprorate hardware-accelerated
rendering into an application with other windows controls, especially not
if I want the render area to be contained in a panel or other control.

You can render to panel etc. just fine with DirectX. When you create Device
just pass it a control you wanna render into.

<snip>
 
P

PJ6

cSharpLess said:
You can render to panel etc. just fine with DirectX. When you create
Device just pass it a control you wanna render into.

<snip>

I get a very unhelpful error message when I try that (as opposed to just
passing the form handle).

If you're feeling generous, please post a simple class inheriting from
Control that renders something using DirectX 10.

Thanks,
Paul
 
P

Patrice

AFAIK DX10 is not usable from Managed Code yet ? Or do I miss something ?

IMO it's generally better to mention the exact error message you have (the
debug runtime can also be helpfull) and that you provide the simplest
possible code that repro the error if needed.

A sample won't do exactly what you want and could not include som other
point that causes the problem...

You can try microsoft.public.win32.programmer.directx.managed if you don"t
have tried it already....
 
P

PJ6

Ahh now we're getting somewhere. I thought something was wrong when I
blue-screened myself. Well, after I had a good laugh.

I'll back up, uninstall 10 and go with 9.

Good NG suggestion, too.

Thank you!
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top