public static extern ushort RegisterClass(ref WNDCLASS lpWndClass);
protected ushort RegisterClass(string className) { WNDCLASS lpWndClass = new WNDCLASS { cbClsExtra = 0, cbWndExtra = 0, hbrBackground = IntPtr.Zero, hCursor = IntPtr.Zero, hIcon = IntPtr.Zero, lpfnWndProc = this.wndProc = new WndProc(this.WndProc), lpszClassName = className, lpszMenuName = null, style = 0 }; return NativeMethodsPack.NativeMethods.RegisterClass(ref lpWndClass); }