Class SafeWindowDcHandle
A WindowDC SafeHandle implementation
Inheritance
System.Object
SafeWindowDcHandle
Namespace: Dapplo.Windows.Gdi32.SafeHandles
Assembly: Dapplo.Windows.Gdi32.dll
Syntax
public class SafeWindowDcHandle : SafeHandleZeroOrMinusOneIsInvalid
Constructors
| Improve this Doc View SourceSafeWindowDcHandle()
Default constructor is needed to support marshalling!!
Declaration
public SafeWindowDcHandle()
SafeWindowDcHandle(IntPtr, IntPtr)
Create a SafeWindowDcHandle for an existing handöe
Declaration
public SafeWindowDcHandle(IntPtr hWnd, IntPtr existingDcHandle)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | hWnd | IntPtr for the window |
IntPtr | existingDcHandle | IntPtr to the DC |
Methods
| Improve this Doc View SourceFromDesktop()
Declaration
public static SafeWindowDcHandle FromDesktop()
Returns
Type | Description |
---|---|
SafeWindowDcHandle |
ReleaseHandle()
ReleaseDC for the original Window
Declaration
protected override bool ReleaseHandle()
Returns
Type | Description |
---|---|
System.Boolean | true if this worked |