The window creation has seen some revision which ultimately lead to this super-compact solution.
As shown, the standard way of creating a window is by subclassing Window. WindowParams is the only arguments, and is used to specify only the necessary parameters. By default, if you use a raw WindowParams, it will create a standard top level window.
If the window is not used for drawing, it should have some controls. These can be created using the global functions like CreateButton(). The controls can be assigned to Control wrappers like Edit or Button, which allow to call welldefined methods on the controls.
This sample creates two textfields for a login form. As you can see, the button does not have a window ID, it is set to null. The response function is bound to the button handle, thus creating an unambiguous connection.