The very first program written to test the Windows API was almost certainly a minimal internal demo, likely just creating a window. However, the earliest internal Windows program was "MS-DOS Executive" — a file manager that doubled as the Windows 1.0 shell. But even earlier, during development, a simple "Hello Win" program (analogous to "Hello, World") was used by Microsoft engineers to verify GUI creation, message handling, and GDI (Graphics Device Interface) drawing.
The WinMain function performs the following tasks: first windows program
if (!RegisterClassEx(&wc))
if (hwnd == NULL)