Page 1 of 1

Windowless Activex Controls are not supported.

Posted: Thu Nov 24, 2005 1:28 pm
by 9524776
Hi,

We use Teechart 7 (v 7.0.0.5) in a WinApp. The control seems to run perfectly and the corrects results are showed. But an execption is throwed, on the dispose event i suppose.

Is is logged by the application. The exception is the TargetInvocationException "Unable to get the window handle for 'AxTTchart' control. Windowless ActiveX controls are not supported.

The full exception is (in french):
"
Date : 21/11/2005 12:21:12
Système d'exploitation : Microsoft Windows NT 5.1.2600.0
Message : Impossible d'obtenir le handle de fenêtre pour le contrôle 'AxTChart'. Les contrôles ActiveX sans fenêtre ne sont pas pris en charge.
Nom : System.Windows.Forms
Pile :
at System.Windows.Forms.AxHost.MakeVisibleWithShow()
at System.Windows.Forms.AxHost.OnContainerVisibleChanged(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.ScrollableControl.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.OnParentVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.ScrollableControl.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.OnParentVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.ScrollableControl.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.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)

Exception interne :
System.Reflection.TargetInvocationException: Impossible d'obtenir le handle de fenêtre pour le contrôle 'AxTChart'. Les contrôles ActiveX sans fenêtre ne sont pas pris en charge. ---> System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
at System.Windows.Forms.AxHost.DoVerb(Int32 verb)
at System.Windows.Forms.AxHost.MakeVisibleWithShow()
--- Fin de la trace de la pile d'exception interne ---
at System.Windows.Forms.AxHost.MakeVisibleWithShow()
at System.Windows.Forms.AxHost.OnContainerVisibleChanged(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.ScrollableControl.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.OnParentVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.ScrollableControl.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.OnParentVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.ScrollableControl.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.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)"

So can you tell me what happened and how to correct this ?

Thanks in advance.

Fred CHASSAGNE

Posted: Fri Nov 25, 2005 12:48 pm
by Marc
Hello Fred,

I'm not immediately sure what the problem might be. TeeChart isn't a Windowless Control so I wouldn't have expected the error message.

Do you get a similar error message if you open (and close) one of the TeeChart example projects for .NET ?

What kind of project should we build here to try and recreate the problem, I see references to UserControl in the error text? Are you able to leave us an example project on news://www.steema.net/steema.public.attachments ?

With thanks.
Regards,
Marc Meumann

Posted: Tue Nov 29, 2005 8:31 am
by 9524776
Hello Marc,

Thank's for your answer. I 've try to reproduce it by open and close some demo projects. It works perfectly.

I have not able to leave you an example now, so sorry about this.

For this issue (we have an other one with v7.0.05 but i will describe it in an other post), the only thing we do is to dock the Teechart component in a user control in order to ovveride some comportment (right click menu for example).

So our chart component Inherits System.Windows.Forms.UserControl, has a teechart docked, a teechart previewer and a contextMenu on it.

I think the issue come when trying to dispose.

If you have any idea, you're welcome.

Thanks in advance.
Fred CHASSAGNE.