INFO: Using a VBX Control in an AFXDLL Dialog BoxLast reviewed: July 22, 1997Article ID: Q98586 |
The information in this article applies to:
SUMMARYAn AFXDLL dynamic-link library cannot include a VBX control in one of its dialog box templates (such as those created by AppStudio). When the application that calls the DLL calls the EnableVBX() function, it registers the VBControl window class with Microsoft Windows. The VBControl class is registered as a local window class, not as a global window class. A local window class is available only to the module in which the class is registered. Because a DLL has its own module that is different from the calling application, the VBControl class is not available to the DLL. To work around this behavior, the application can call the Create() member function of the CVBControl class to create the VBX control. Call Create() in the OnInitDialog() function (for a modal dialog box) or in the OnCreate() function (for a modeless dialog box). |
Keywords : kb16bitonly kbprg MfcVBX kbinfo
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |