Closed PlumpMath closed 6 years ago
This is merely a Windows API interop. So, you'll want to be familiar with how Windows does it's drawing. So, I'm afraid it's out of scope of this particular library to provide a direct way to do that.
That being said, fortunately, I happen to write a sample that might lead you to it. The DirectX one: https://github.com/prasannavl/WinApi/blob/master/Samples/Sample.DirectX/MainWindow.cs
Just set the alpha in these brushes, and you should be good.
WPF does it's drawing using DirectX. Here you have complete control over the DirectX context, and can you do whatever, however you want with it. In addition, there's even a helper for DwmWindow, that lets you do more cool things like borderless window of your own shape, etc. (but not the ones I usually tend to cringe at -- this would be DirectX and Composition API backed with hardware acceleration that's light as feather)
But as I said, you're better off asking those questions in communities like StackOverflow.
Thank you. prasannavl
I don't know exactly what you mean, But thank you for teaching me so much. That's really good information for me as a beginner. I was curious about Dwm.)
Excuse me, but may I ask you another question? What if the WPF is rendering based on directX? by any chance Is transparency of WinApi+OpenGL combinations possible like directX+winapi combinations? I'm not sure if the question is right. Still, I have tried only wpf and winform. I don't know Win32 so please understand me.) I want to use fast winapi and I want to know. Thank you for your good project and answer. Good Day :)
What if the WPF is rendering based on directX?
Here you have the access to the underlying D3D, and D2D context. Which means whatever you can do with WPF, you can do it here, and even things that WPF won't let you.
Is transparency of WinApi+OpenGL combinations possible like directX+winapi combinations?
I wouldn't do it. It's complicated at best. If you don't care about performance, may be, just may be, you could render OpenGL to an off screen texture, and copy that over to D3D.
What if the WPF is rendering based on directX?
Here you have the access to the underlying D3D, and D2D context. Which means what you can do with WPF, you can do it here, and even things that WPF won't let you.
Is transparency of WinApi+OpenGL combinations possible like directX+winapi combinations?
I wouldn't do it. It's complicated at best. If you don't care about performance, may be, just may be, you could render OpenGL to an off screen texture, and copy that over to D3D.
Ok. Thanks good!
I want hole & transparent background (specific color. like wpf) how can I?
thanks.