OWLNext 7.0
Borland's Object Windows Library for the modern age
|
When you construct a TApplication object, it calls its TApplication::InitApplication(), TApplication::InitInstance(), and TApplication::InitMainWindow() member functions to start the application.
You can override any of those members to customize how your application initializes. You must override InitMainWindow to have a useful application. To override a function in TApplication you need to derive your own application class from TApplication.
The constructor for the TApplication-derived class TMyApplication, shown in the examples that follow, takes the application name as its only argument; its default value is zero, for no name. The application name is used for the default main window title and in error messages. The application name is referenced by a char far* member of the TModule base class called Name. You can set the application name one of two ways:
To construct an application object, create an instance of your application class in the OwlMain function. The following example shows a simple application object's definition and instantiation: