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


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...
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 you are creating multiple dialogs ??
Also try calling AfxEnableControlContainer() in your app's InitInstance.

kuchnaheenAuthor Commented:
AfxEnableControlContainer did the trick...
All Courses

From novice to tech pro — start learning today.