OWLNext 7.0
Borland's Object Windows Library for the modern age
|
ObjectWindows provides a default WinMain function that provides extensive error checking and exception handling.
This WinMain function sets up the application and calls the OwlMain function.
Although you can use your own WinMain by placing it in a source file, there is little reason to do so. Everything you would otherwise do in WinMain you can do in OwlMain or in TApplication initialization member functions. In the following example, OwlMain checks to see whether the use specified any parameters on the application's command line. If so, OwlMain creates the application object and uses the first parameter as the application name. If not, OwlMain creates the application object and uses Wow! as the application name.
If you do decide to provide your own WinMain, TApplication supports passing traditional WinMain function parameters with another constructor. The following example shows how to use that constructor to pass WinMain parameters to the TApplication object: