Friday, June 21, 2013

Creating a IWin32Window from a Win32 Handle

Creating a IWin32Window from a Win32 Handle: "Creating the IWin32Window wrapper class"

Thank you Sir. Here's my code based from yours.

public class WindowWrapper : IWin32Window {
public static WindowWrapper CreateWindowWrapper( IntPtr handle ) {
return new WindowWrapper( handle );
}

private WindowWrapper( IntPtr handle ) {
this.Handle = handle;
}

public IntPtr Handle { get; private set; }
}