From 38cb89fd1bbbd3777d38aeb5d1f8568d09f7d436 Mon Sep 17 00:00:00 2001 From: Zaafar <5079646+zaafar@users.noreply.github.com> Date: Wed, 15 May 2024 23:32:26 -0400 Subject: [PATCH] exposing window handle --- ClickableTransparentOverlay/Overlay.cs | 7 ++++++- ClickableTransparentOverlay/Win32Window.cs | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ClickableTransparentOverlay/Overlay.cs b/ClickableTransparentOverlay/Overlay.cs index 9f096f4..25b8c4f 100644 --- a/ClickableTransparentOverlay/Overlay.cs +++ b/ClickableTransparentOverlay/Overlay.cs @@ -32,7 +32,12 @@ public abstract class Overlay : IDisposable private readonly int initialWindowHeight; private WNDCLASSEX wndClass; - private Win32Window window; + + /// + /// Do not assume this class is initialized. + /// Consider using this variable only in or function. + /// + public Win32Window window; private ID3D11Device device; private ID3D11DeviceContext deviceContext; private IDXGISwapChain swapChain; diff --git a/ClickableTransparentOverlay/Win32Window.cs b/ClickableTransparentOverlay/Win32Window.cs index 61ba25c..a66edb5 100644 --- a/ClickableTransparentOverlay/Win32Window.cs +++ b/ClickableTransparentOverlay/Win32Window.cs @@ -4,7 +4,7 @@ using System; using System.Drawing; - internal sealed class Win32Window : IDisposable + public sealed class Win32Window : IDisposable { public IntPtr Handle; public Rectangle Dimensions;