A SafeHandle representing an HWND with strong ownership semantics.
This class is located in the ComCtl32 library because of its dependency on WindowSubclass.
Наследование: AdvancedLauncher.Tools.Win32.User32.HWND
Пример #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;
 }
Пример #3
0
 internal void TransferHandleOwnership(StrongHWND hwnd)
 {
     Debug.Assert(hwnd == _hwnd); // equivalency, not reference equals
     _hwnd = hwnd;
 }