Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

CNiGraph and ActiveX control

I have an ActiveX control in which I would like to place CNiGraph control, but when I'm dragging it from toolbox to my dialog box (style: child,border: none) and try to debug it, then it crashes and jumps over here:
//winocc.cpp
BOOL CWnd::ShowWindow(int nCmdShow)
{
    ASSERT(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL));

    if (m_pCtrlSite == NULL)
        return ::ShowWindow(m_hWnd, nCmdShow);
    else
        return m_pCtrlSite->ShowWindow(nCmdShow);
}

And it crashes on the line ASSERT(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL)); I think that's becouse CNiGraph is not a window?

0 Kudos
Message 1 of 2
(6,040 Views)
Ok, sorry for noobie question 🙂
I just had to add:     AfxEnableControlContainer(); in  COCXTest2App::InitInstance() method ;]
0 Kudos
Message 2 of 2
(6,036 Views)