Page 1 of 1

TChart componenets in DLL called from exe

Posted: Tue Nov 21, 2006 3:49 pm
by 9532498
I've added all my Tchart classes to a dll. In my application (.exe) I include a Tchart component on one of the dialogs. This doesn't seem to work. When invoked, the dialog is not displayed at all. However, if the dialog is part of the DLL, then all works fine. Am I missing something?

Also, can someone point me to an example of how I can include a TChart on a form within my code? I've seen examples of how it is added at design time.

Posted: Mon Nov 27, 2006 1:51 pm
by Pep
Hi,
I've added all my Tchart classes to a dll. In my application (.exe) I include a Tchart component on one of the dialogs. This doesn't seem to work. When invoked, the dialog is not displayed at all. However, if the dialog is part of the DLL, then all works fine. Am I missing something?
It's difficult to know where is the problem without seeing the code you're using. Could you please post a simple example at the news://www.steema.net/steema.public.attachments newsgroup with which we can reproduce as is the problem here ?
Also, can someone point me to an example of how I can include a TChart on a form within my code? I've seen examples of how it is added at design time.
Here, an example :

Code: Select all

Private Sub Form_Load()
Set TChart1 = Form1.Controls.Add("TeeChart.TChart", "TChart1", Form1)
TChart1.Visible = True
With TChart1
    .Left = 100
    .Top = 100
    .Width = 5000
    .Height = 5000
    .AddSeries scLine
    .Series(0).FillSampleValues 20
End With
End Sub

Posted: Tue Nov 28, 2006 4:05 pm
by 9532498
I'm using MFC and need to know where I should create it? I need to place the TChart in an object of type CMDIChildWnd. Should I create it in the Constructor or in the Create function? I tried creating in the pre-create method but the TChart was not displayed.

Posted: Wed Nov 29, 2006 11:09 am
by Pep
Hi,

I've posted an example which shows how to create a Chart in a MDI Child app. with VC++ at news://www.steema.net/steema.public.attachments newsgroup.