ActiveX control from dialog box in DLL? 
Author Message
 ActiveX control from dialog box in DLL?

I am trying to get an ActiveX control to work on a dialog box created in a
DLL.  Whenever I add the control to my dialog, the whole dialog does not
show (clicking on the button in the main application that initiates the
dialog does nothing).  When I remove the control, the dialog appears and
operates just fine.

The ActiveX control is a subclass of CWnd, I believe.  I have used component
gallery to add the control to my project, used Class Wizard to build the
wrapper class, and drawn the control on my dialog - with no luck.  I have
also tried bringing up the dialog using the CDialog class, as well as strict
Win32 calls with the same result.  Any ideas?

The current DLL I am using is a standard Win32 DLL.  However, I have tried a
simple test with a regular MFC DLL with the same results.  Do I need to use
an extension MFC DLL?  Is MFC required at all (C++ and classes are a bit new
to me)?  Am I just plain out of luck?

TIA for any assistance.

Dan



Tue, 01 Aug 2000 03:00:00 GMT  
 ActiveX control from dialog box in DLL?

Check out this KB article "BUG: AfxOleInit Returns TRUE Without
Initializing OLE in a DLL" ID: Q154320. This might be the cause for your
problems. http://support.microsoft.com/support/kb/articles/q154/3/20.asp
Also, Remember to call AfxEnableControlContainer () after the the fix
specified above.

--
Girish Bharadwaj [VC++/MVP]

Quote:

>I am trying to get an ActiveX control to work on a dialog box created in a
>DLL.  Whenever I add the control to my dialog, the whole dialog does not
>show (clicking on the button in the main application that initiates the
>dialog does nothing).  When I remove the control, the dialog appears and
>operates just fine.

>The ActiveX control is a subclass of CWnd, I believe.  I have used
component
>gallery to add the control to my project, used Class Wizard to build the
>wrapper class, and drawn the control on my dialog - with no luck.  I have
>also tried bringing up the dialog using the CDialog class, as well as
strict
>Win32 calls with the same result.  Any ideas?

>The current DLL I am using is a standard Win32 DLL.  However, I have tried
a
>simple test with a regular MFC DLL with the same results.  Do I need to use
>an extension MFC DLL?  Is MFC required at all (C++ and classes are a bit
new
>to me)?  Am I just plain out of luck?

>TIA for any assistance.

>Dan



Tue, 01 Aug 2000 03:00:00 GMT  
 ActiveX control from dialog box in DLL?

Thanks Girish!

That was exactly what I needed.  I plugged the code snippet from the KB
article into InitInstance (MFC regular DLL) and all worked fine.

Once again, muchos gracias on a very timely response!

-oly

Quote:

>Check out this KB article "BUG: AfxOleInit Returns TRUE Without
>Initializing OLE in a DLL" ID: Q154320. This might be the cause for your
>problems. http://support.microsoft.com/support/kb/articles/q154/3/20.asp
>Also, Remember to call AfxEnableControlContainer () after the the fix
>specified above.



Tue, 01 Aug 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. HELP: activex control in dialog box in mfc user dll (dialog not launching)

2. Cannot add an ActiveX control to a DLL dialog box

3. Cannot add an ActiveX control to a DLL dialog box

4. ATL ActiveX Composite Control WITHOUT a dialog box?

5. ActiveX Control in Dialog Box

6. Assertion in wincore.cpp when I close a dialog box having Activex controls

7. How do you add an ActiveX control to a dialog box

8. Tab order in dialog box with any activeX control

9. Getting events from an ActiveX control not in a dialog box

10. Launching dialog box with ActiveX Control...

11. Using ActiveX controls on dialog boxes?

12. HELP! ActiveX controls in dialog box

 

 
Powered by phpBB® Forum Software