TChart componenets in DLL called from exe

TeeChart for ActiveX, COM and ASP
Post Reply
nbp
Newbie
Newbie
Posts: 83
Joined: Mon Sep 18, 2006 12:00 am

TChart componenets in DLL called from exe

Post by nbp » Tue Nov 21, 2006 3:49 pm

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.

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Nov 27, 2006 1:51 pm

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

nbp
Newbie
Newbie
Posts: 83
Joined: Mon Sep 18, 2006 12:00 am

Post by nbp » Tue Nov 28, 2006 4:05 pm

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.

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Nov 29, 2006 11:09 am

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.

Post Reply