Chart drawing fails after loading other 3rd party DLL
Posted: Fri Jul 14, 2006 11:45 am
Hi!,
I'm getting a strange exception when trying to draw a chart after loading other 3rd party DLL with CoInitialize and LoadLibrary. The place where the chart should appear is left blank with red cross over it and following exception is thrown:
I know that it may be impossible to say what the exact cause for this is, but does anyone have any ideas on what might be causing this behavior?
I'm using Visual C++.NET 2003.
Thanks in advance!
I'm getting a strange exception when trying to draw a chart after loading other 3rd party DLL with CoInitialize and LoadLibrary. The place where the chart should appear is left blank with red cross over it and following exception is thrown:
Code: Select all
System.ArithmeticException: Overflow or underflow in the arithmetic operation.
at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
at System.Drawing.Font.Initialize(String familyName, Single emSize, FontStyle style, GraphicsUnit unit)
at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style)
at Steema.TeeChart.Drawing.ChartFont.get_DrawingFont()
at Steema.TeeChart.Drawing.Graphics3DGdiPlus.MeasureString(ChartFont f, String text)
at Steema.TeeChart.Drawing.Graphics3D.TextHeight(String text)
at Steema.TeeChart.Drawing.Graphics3D.get_FontHeight()
at Steema.TeeChart.Title.Draw(Graphics3D g, Rectangle& rect)
at Steema.TeeChart.Title.DoDraw(Graphics3D g, Rectangle& rect, Boolean CustomOnly)
at Steema.TeeChart.Chart.DrawTitleFoot(Rectangle& rect, Boolean CustomOnly)
at Steema.TeeChart.Chart.DrawTitlesAndLegend(Graphics g, Rectangle& tmp, Boolean BeforeSeries)
at Steema.TeeChart.Chart.InternalDraw(Graphics g, Boolean noTools)
at Steema.TeeChart.Chart.InternalDraw(Graphics g)
at Steema.TeeChart.TChart.Draw(Graphics g)
at Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I'm using Visual C++.NET 2003.
Thanks in advance!