COM Dll with MFC Dialog containing an ActiveX Control 
Author Message
 COM Dll with MFC Dialog containing an ActiveX Control

Hello everyone, I'm working with a com component that launches an MFC
Dll (MFC is  necessary). Inside the dll there is an Active X Control
(Microsoft's Flex Grid). I can't seem to get it working correctly. If
I delete the Active X Control, the dialog shows just fine. However,
with it in the dialog, I recieve this in the debug output window :

Quote:
>>> If this dialog has OLE controls:
>>> AfxEnableControlContainer has not been called yet.
>>> You should call it in your app's InitInstance function.

However, I've added a function call to AfxEnableControlContainer to
the dll's initialize function, to the class creating the dialog, and
to the dialog's constructor. In every case, it still doesn't function.
When I call do dialog, it returns cleanly, (No Asserts, no crashes)
but it returns -1. I think there is something obvious that I am
missing. Has anyone come across anything similar?


Wed, 30 Mar 2005 03:56:56 GMT  
 COM Dll with MFC Dialog containing an ActiveX Control
Please refer your MFC related questions to microsoft.public.vc.mfcole
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> Hello everyone, I'm working with a com component that launches an MFC
> Dll (MFC is  necessary). Inside the dll there is an Active X Control
> (Microsoft's Flex Grid). I can't seem to get it working correctly. If
> I delete the Active X Control, the dialog shows just fine. However,
> with it in the dialog, I recieve this in the debug output window :

> >>> If this dialog has OLE controls:
> >>> AfxEnableControlContainer has not been called yet.
> >>> You should call it in your app's InitInstance function.

> However, I've added a function call to AfxEnableControlContainer to
> the dll's initialize function, to the class creating the dialog, and
> to the dialog's constructor. In every case, it still doesn't function.
> When I call do dialog, it returns cleanly, (No Asserts, no crashes)
> but it returns -1. I think there is something obvious that I am
> missing. Has anyone come across anything similar?



Wed, 30 Mar 2005 04:26:34 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. MFC: CDialog::Create fails if dialog contains an ActiveX control

2. VC++ DLL:fail to load dialog contain activex control

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

4. Need help with ActiveX control containing other activex controls

5. Need help with ActiveX control containing other activex controls

6. Creating ActiveX control in an MFC dialog in a DLL

7. ActiveX control in MFC .dll Dialog.

8. HOWTO: MFC ActiveX Control Containing CButton

9. MFC: Exposing ActiveX methods that is contained in another ActiveX

10. Displaying Dialog box in Extension DLL which contains Custom Control

11. Using an MFC Extension DLL from an MFC ActiveX Control

12. How to invoke methods of contained ActiveX control from ATL Composite Control

 

 
Powered by phpBB® Forum Software