active x fires ASSERT(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL));

I have a very basic activeX control, that I want to include in a dialog box app...

when I test it using a simple dialog box app it works okay..but when I use it in big application containing many dialog boxes and call activeX container dialog box using

m_gameCallDialog->Create(CGameCallDialog::IDD);
 m_gameCallDialog->ShowWindow(TRUE);  

it fires a debug assertion at
ASSERT(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL));

any pointers?

without the activeX in it the dialog box works just fine...
LVL 1
kuchnaheenAsked:
Who is Participating?
 
mahesh1402Connect With a Mentor Commented:
>>ASSERT(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL));

That means one of your window is not fully created and available...how you are creating multiple dialogs ??
Also try calling AfxEnableControlContainer() in your app's InitInstance.

-MAHESH
0
 
kuchnaheenAuthor Commented:
AfxEnableControlContainer did the trick...
0
All Courses

From novice to tech pro — start learning today.