The window handle is not exposed. I have to steal it with reflection to temporarily accomplish the things I request.
protected override Task PostInitialized()
{
var handleField = typeof(Overlay).GetField("window", BindingFlags.NonPublic | BindingFlags.Instance);
if (handleField == null)
throw new Exception("Failed to get window field");
object? window = handleField.GetValue(this);
if (window == null)
throw new Exception("Failed to get window value");
object? handle = window.GetType().GetField("Handle")?.GetValue(window);
if (handle == null)
throw new Exception("Failed to get handle value");
windowHandle = (IntPtr)handle;
return Task.CompletedTask;
}
A lot of native things are not exposed.
A) I cannot put the overlay ontop of another window. I have to do:
This issue is twofold
The window handle is not exposed. I have to steal it with reflection to temporarily accomplish the things I request.
A lot of native things are not exposed.
A) I cannot put the overlay ontop of another window. I have to do:
B) I cannot change the window decoration, for example removing the window.