Cockpit Com Library Interaction

Top  Previous  Next

Automatic Detection of the COM library

 

Some WIN32 functions are extended by functions provided by ATL (the Active Template Library) which supports ActiveX control containment. For example the dialog functions provided by user32.dll have counterparts in atl.dll. The dialog object provided by the Cockpit Platform Library normally uses the WIN32 functions. If the Cockpit COM Library is detected at runtime, the ATL functions are used instead. This allows you to use ActiveX controls in your dialogs. But you must make sure the Cockpit COM library is available at runtime. Initializing the COM system with CoInitialize, CoInitializeEx or OleInitialize in your Main function (which you have to do anyway) will guarantee that.

 

 

Window Class Detection

 

The window class detection for newly created windows is also dynamically connected to the Cockpit COM Library. When the Cockpit COM Library is available at runtime, the window class "AtlAxWindow" is fully supported by the Platform Library. "AtlAxWindow" is the Cockpit window class for the  window class provided by ATL which supports ActiveX control containment. The internal name of the class provided by ATL depends on the version of ATL used.