I was working on a project using WPF, I want to modify the MainWindow
to have some extended window styles. I have referred some docs and found out that I can set the window styles using SetWindowLong()
, but in my case it will not work because I am trying to use WS_EX_NOREDIRECTIONBITMAP
as the extended window style. when I use SetWindowLong()
it does nothing. I have read somewhere that WS_EX_NOREDIRECTIONBITMAP
can only be set while creating the window. So is there any way that i could modify the CreateWindowEx()
of the WPF MainWindow
.
I have found another alternate method to achieve this but it is by using the Undocumented API function.(SetWindowCompositionAttribute()
). I need my project to be stable so is there any other method to achieve this?
If SetWindowCompositionAttribute()
can set WS_EX_NOREDIRECTIONBITMAP
at runtime, there must be a workaround to do this.
Here is the screenshot of what i want to achieve :
It is possible to do it in C++ but in C# WPF i haven't found a way to do this.