Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
 public extern static IntPtr RegisterClassEx(ref WNDCLASSEX wndclassex);