Working with IVBMain Parts

The following tasks are associated with using an IVBMain* part in visual composition. Tasks that are common to many parts are described in related topics.

Renaming the default resource DLL for distribution
The IBM Open Class User Interface Class Library provides a resource DLL that contains common bitmaps for controls. For example, tool bar button bitmaps are provided for file and clipboard operations. Generated code uses this DLL for common bitmaps.

If you use these Open Class resources, you must copy and rename the DLL to ship it with your application. This DLL is shipped with VisualAge as cppoor3u for OS/2; it is shipped as cppwor3u for Windows.

You must inform VisualAge of the renamed DLL before you generate code. To do this, set the userInterfaceResourceLibrary property in the IVBMain* property sheet. Enter your DLL name in the value column. For OS/2 and Windows, enter the name without the .dll extension.

Specifying a user resource DLL
If you have created a resource DLL that you are using with an application, you must inform VisualAge DLL before you generate code. To do this, set the userResourceLibrary property in the IVBMain* property sheet. Enter your DLL name in the value column. For OS/2 and Windows, enter the name without the .dll extension.

Specifying the default message queue size
To set the size of the default message queue for the main{} function's thread of execution, set the defaultQueueSize property in the IVBMain* property sheet. Enter the queue size in the value column.

Displaying startup errors
To display startup errors during testing, set the showStartUpError property in the IVBMain* property sheet. Select true in the value column.

Adding the initial application window
The main part opens the initial window for your application. Add the window in one of the following ways:

Opening the initial application window
To open the initial window for your application, do one of the following:

Destroying a dynamically created window
For a dynamically created window that has been placed in a Variable part, destroy the window when it is closed. To do this, set the autoDeleteTarget property in the variable's property sheet. Select true in the value column.


Related procedures
Composing Parts for Multiple Threads
Working with VisualAge User Interface Parts

Related references
IVBMain
Property Settings -- IVBMain
Portability -- IVBMain