Creating a window
Preface
In Windows 96, all windows inherit the StandardWindow
class, which is found in w96.StandardWindow
.
It is not recommended to instantiate this class directly, as you're meant to be using this.createWindow
inside a WApplication instance, for resource management reasons.
How windows are created
As mentioned before, windows are created with the function below
The params
parameter is an object that contains the initialization parameters to use to create the window. These parameters include fields like title
, resizable
, etc.
The isAppWindow
parameter specifies if the window is an app window (main window). An app window will destroy all child dialogs that have been created inside the WApplication
instance when closed, and will trigger an application termination event.
Creating a basic window
Here is an application that creates a very basic window with some text as the HTML body. You can run it with basic-window-test
through the run box or the terminal.
The result should be something like this:
Last updated