10-25-2005 08:36 AM
We downloaded an example from the following site:
We converted the project to VC++7.0 solution.
When we tried to create a single control it worked fine.
But when we create the second control it crashes.
void CDynamicControlDlg::OnButton1()
{
CNiReal64Vector rt;
CNiMath::SineWave(rt, 60, 1.0);
BSTR bstrLic = ::SysAllocStringLen(pwchUILic, sizeof (pwchUILic) / sizeof(WCHAR));
m_graph1.Create("", WS_VISIBLE, CRect(110,20,370,200),this, 0,NULL, FALSE, bstrLic);
m_graph1.PlotY(rt);
::SysFreeString(bstrLic);
::AfxMessageBox("WAIT for the crash.....");
BSTR bstrLic1 = ::SysAllocStringLen(pwchUILic, sizeof (pwchUILic) / sizeof(WCHAR));
m_graph2.Create("", WS_VISIBLE, CRect(200,120,350,300),this, 0,NULL, FALSE, bstrLic1);
m_graph2.PlotY(rt);
::SysFreeString(bstrLic1);
}
10-26-2005 09:16 AM - edited 10-26-2005 09:16 AM
BSTR bstrLic = ::SysAllocStringLen(pwchUILic, sizeof (pwchUILic) / sizeof(WCHAR));
m_graph1.Create("", WS_VISIBLE, CRect(110,20,370,200),this, 0,NULL, FALSE, bstrLic);
m_graph1.PlotY(rt);
::SysFreeString(bstrLic);
::AfxMessageBox("WAIT for the crash.....");
BSTR bstrLic1 = ::SysAllocStringLen(pwchUILic, sizeof (pwchUILic) / sizeof(WCHAR));
m_graph2.Create("", WS_VISIBLE, CRect(200,120,350,300),this, 1002,NULL, FALSE, bstrLic1);
m_graph2.PlotY(rt);
::SysFreeString(bstrLic1);
Message Edited by bilalD on 10-26-2005 09:17 AM