A SafeHandle representing an HWND with strong ownership semantics.
This class is located in the ComCtl32 library because of its dependency on WindowSubclass.
Inheritance: AdvancedLauncher.Tools.Win32.User32.HWND
Beispiel #1
0
 public StrongHWNDSubclass(StrongHWND strongHwnd) : base(new HWND(strongHwnd.DangerousGetHandle()))
 {
     // Note that we passed a new "weak" HWND handle to the base class.
     // This is because we don't want the StrongHWNDSubclass processing
     // a partially disposed handle in its own Dispose methods.
     _strongHwnd = strongHwnd;
 }
 public StrongHWNDSubclass(StrongHWND strongHwnd)
     : base(new HWND(strongHwnd.DangerousGetHandle()))
 {
     // Note that we passed a new "weak" HWND handle to the base class.
     // This is because we don't want the StrongHWNDSubclass processing
     // a partially disposed handle in its own Dispose methods.
     _strongHwnd = strongHwnd;
 }
 internal void TransferHandleOwnership(StrongHWND hwnd)
 {
     Debug.Assert(hwnd == _hwnd); // equivalency, not reference equals
     _hwnd = hwnd;
 }