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

Posted on 2007-09-28
Last Modified: 2013-11-20
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...
Question by:kuchnaheen
    LVL 22

    Accepted Solution

    >>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.

    LVL 1

    Author Comment

    AfxEnableControlContainer did the trick...

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
    If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
    The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now