OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Initializing new instances

A user can run multiple instances (copies) of an application simultaneously.

You can override TApplication::InitInstance() to perform any initialization you need to do for each instance. InitInstance calls InitMainWindow and then creates and shows the main window you set up in InitMainWindow. If you override InitInstance, be sure your new InitInstance calls TApplication::InitInstance. The following example shows how to use InitInstance to load an accelerator table.

void
TTestApp::InitInstance()
{
TApplication::InitInstance();
HAccTable = LoadAccelerators(MAKEINTRESOURCE(MYACCELS));
}