Dialogs with ActiveX controls in MFC regular dlls
-
I've been developing an MFC regular dll which exports a function which creates and displays a dialog. Everytthing works fine. However I get a problem when I insert an Active -X control (eg: MS-Chart control) at design time and then display the dialog. In this case when I call my exported function the dialog is not displayed at all, and I noticed one thing DoModal returns IDCANCEL. What do I do to solve this problem. Thanks, Anyhelp would be highly appreciated.
-
I've been developing an MFC regular dll which exports a function which creates and displays a dialog. Everytthing works fine. However I get a problem when I insert an Active -X control (eg: MS-Chart control) at design time and then display the dialog. In this case when I call my exported function the dialog is not displayed at all, and I noticed one thing DoModal returns IDCANCEL. What do I do to solve this problem. Thanks, Anyhelp would be highly appreciated.
Did you call AfxOleInit() and AfxEnableControlContainer() ? ================== The original message was: I've been developing an MFC regular dll which exports a function which creates and displays a dialog. Everytthing works fine. However I get a problem when I
insert an Active -X control (eg: MS-Chart control) at design time and then display the dialog. In this case when I call my exported function the dialog is not displayed at all, and I noticed one thing DoModal returns IDCANCEL.
What do I do to solve this problem.
Thanks, Anyhelp would be highly appreciated. -
Did you call AfxOleInit() and AfxEnableControlContainer() ? ================== The original message was: I've been developing an MFC regular dll which exports a function which creates and displays a dialog. Everytthing works fine. However I get a problem when I
insert an Active -X control (eg: MS-Chart control) at design time and then display the dialog. In this case when I call my exported function the dialog is not displayed at all, and I noticed one thing DoModal returns IDCANCEL.
What do I do to solve this problem.
Thanks, Anyhelp would be highly appreciated.Actually the client part of the code creates an MFC worker thread which calls my exportred function. I found a KB article in MSDN which said that I need to call OleInitialize(0) from my client. I did that also, but the dialog is still not displayed. Any ideas ? Here is the pseudo-code, UINT Thread Proc(LPVOID ) { //exported function from regular dll which //has a dialog with a Registered Active-X control ShowDlg(); return 0; } void CMainFrame::OnViewTest() { AfxBeginThread(x,y); } The thing works fine if there is no thread involved. ================== The original message was: Did you call AfxOleInit() and AfxEnableControlContainer() ?
==================
The original message was:I've been developing an MFC regular dll which exports a function which creates and displays a dialog. Everytthing works fine. However I get a problem when I
insert an Active -X control (eg: MS-Chart control) at design time and then display the dialog. In this case when I call my exported function the dialog is not displayed at all, and I noticed one thing DoModal returns IDCANCEL.
What do I do to solve this problem.
Thanks, Anyhelp would be highly appreciated.