static void Main() { var hInstance = default(HINSTANCE); var nCmdShow = C.SW_SHOW; // Register the window class. var CLASS_NAME = "Sample Window Class"; var wc = new WNDCLASSW { }; wc.lpfnWndProc = WindowProc; wc.hInstance = hInstance; wc.lpszClassName = CLASS_NAME; user32.RegisterClassW(ref wc); // Create the window. var hwnd = user32.CreateWindowExW( 0, // Optional window styles. CLASS_NAME, // Window class "Learn to Program Windows", // Window text C.WS_OVERLAPPEDWINDOW, // Window style // Size and position C.CW_USEDEFAULT, C.CW_USEDEFAULT, C.CW_USEDEFAULT, C.CW_USEDEFAULT,
private static extern ushort RegisterClassW([In] ref WNDCLASSW lpWndClass);