Windows and .NET: We're making it simpler
Let's create a new Window in Win32:
HWND hwndMain = CreateWindowEx(
0, "MainWClass", "Main Window",
WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
(HWND)NULL, (HMENU)NULL, hInstance, NULL );
ShowWindow( hwndMain, SW_SHOWDEFAULT );
UpdateWindow( hwndMain );
Now let's do the same thing in “.NET“:
Window w = new Window();
w.Text = "Main Window";
w.Show();
Managed code and the .NET Framework is about elegance in simplicity. We are trying to make our future managed Windows APIs hold true to the notion of enabling you to solve complex problems simply. That's the future.
Charles