public static IntPtr MyRegisterWndClass(string className, IntPtr hInstance) { WNDCLASSEX wcex = new WNDCLASSEX(); wcex.cbSize = Marshal.SizeOf(typeof(WNDCLASSEX)); wcex.hInstance = hInstance; wcex.lpszClassName = className; wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.hbrBackground = (IntPtr)(COLOR_WINDOW + 1); wcex.lpfnWndProc = MyWndProc; return(RegisterClassEx(ref wcex)); }
public extern static IntPtr RegisterClassEx(ref WNDCLASSEX wndclassex);