This is an example for the system crash. The example program will stop (or
crash) after a couple of minutes (2-3 minutes). If the default constructor
will use "CNiInterface::SingleThreaded" of the CNiGraph the crash will be
after 10 to 12 minutes. This problem is only under Windows 98, not with
Windows 2000. Only the "cwui.ocx" version 6.0 will cause the problem.
void CGraphExampleDlg::OnTimer(UINT nIDEvent)
{
// some code here, llok at graph example
// the following lines are added
m_Graph.Axes.Item("YAxis-1").Ticks.Inside = false;
m_Graph.Axes.Item("YAxis-1").Ticks.Outside = true;
m_Graph.Axes.Item("YAxis-1").Ticks.Above = false;
m_Graph.Axes.Item("YAxis-1").Ticks.Right = false;
m_Graph.Axes.Item("YAxis-1").Labels.Above = false;
m_Graph.Axes.Item("YAxis-1").Inverted = false;
m_Graph.Axes.Item("YAxis-1").Log = false;
m_Graph.Axes.Item("YAxis-1").Ticks.MajorTicks = true;
m_Graph.Axes.Item("YAxis-1").Ticks.MinorTicks = false;
m_Graph.Axes.Item("YAxis-1").Maximum = 1;
m_Graph.Axes.Item("YAxis-1").Minimum = -1;
// if the following line was removed, there is no problem
m_Graph.Axes.Item("YAxis-1").AutoScale = true;
m_Graph.Axes.Item("YAxis-1").Labels.Left = true;
m_Graph.Axes.Item("YAxis-1").Labels.Right = true;
m_Graph.Axes.Item("YAxis-1").Ticks.Left = true;
m_Graph.Axes.Item("YAxis-1").Ticks.Right = true;
CDialog::OnTimer(nIDEvent);
}
Need help!
Greetings Torsten
"Torsten Schultz" schrieb im Newsbeitrag
news:3ce35042@newsgroups....
> hi,
>
> we use in our application the Measurement Studio 6.0 (cwui.ocx 6.0.3.589)
> the CNiGraph. A timer call will plot the online values every 200 ms by
using
> the method ChartXvsY. We also use the fix (from NI) for this function
> located on the ftp server
> (ftp://ftp.ni.com/support/mstudio/vc/fixes/6.0/ChartXvsY/) because without
> the patch the method will call PlotXvsY instead of ChartXvsY.
>
> If we use the method "CWAxis.AutoScaleNow" our application will crash
after
> a few minutes (Total crash, no blue screen, just system reboot, Windows 98
> SE). If we replace the cwui.ocx version 6.0.3.589 with the previous
version
> 3.0.3.549 (Measurement Studio 1.0 SP2) the same application (same system,
> same dlls and so, just replace the cwui.ocx in the system folder) the
> application will run correctly.
>
> Any idea???? We need help. We posted this problem to NI, but we are still
> wating for an answer.
>
> Torsten Schultz
>
>
[Attachment nigraph.zip, see below]