Posted By: Viashivan | Dec 8th, 2008 @ 2:48 AM
page 1 of 1
Comments: 10 | Views: 1355
Hi there,
I'm building a Win32 application.
I'd like to build a WPF dll that catches/renders the Win32 app's framebuffer?
What do you think about? is it possible or not? if yes how can I do it?
Thanks,
Carmelo.
So you want to interrupt GDI and render it with WPF instead?  I'm confused.
I just have to ask why do you want to do this?
I'm still learning WPF, but WPF is built on DirectX, so I imagine there has to be a way to intercept the framebuffer before it's rendered to the screen.
figuerres
figuerres
???

it might be possible but that sounds very very ugly in so many ways.... I really wonder what it is that you want to have in the end?

are you wanting the Win32 app to have a screen that has things that are drawn by WPF ??

if so you could host a WPF controll inside a WIn32 form and that would be much simpler and cleaner to do.

what tech is showing the screen, WIn32/GDI or Win32/WPF?
you can host GDI controls in a WPF form
or
you can host WPF controls in a GDI form

each of them will work and not need you to hack up framebuffer captures.

also I think that grabbing framebuffers could be difficult for new versions of windows later, the app might not work.
also it might have some probems with the DirectX stack installed on a given users pc and / or with the hardware they have ....
I can see a lot of ways this could be very unstable and buggy on some users pc's

too many details that could break... may not be a big deal today for a small number of users but....

DCMonkey
DCMonkey
Monkey see, monkey do, monkey will destroy you!

Also, your post title says Direct3D, but your posts say Win32. Which is it? The former could be considered a subset of the later, but you also confirmed you want to intercept GDI, which has little to do with Direct3D.

Also, you keep talking about this "WPF dll". Does it display something on screen using Interop, or is it just rendering to an internal memory buffer that you want to do other things with?

And just to throw another variable onto the stack, perhaps D3DImage from .Net 3.5 SP1 will help accomplish what you are really trying to do.

http://msdn.microsoft.com/en-us/library/system.windows.interop.d3dimage.aspx

figuerres
figuerres
???
the OP says he wants to "Blend" them so it sounds kind of like he wants to "composit" them,  sounds kind of like he wants a window that has some kind of visual effect that he needs to do from WPF onto a Forms/GDI window.
if so he is ither confused or a genius... not sure which till he explains the deseried result and how it would be used.
page 1 of 1
Comments: 10 | Views: 1355
Microsoft Communities