TeeChart not drawing to a device context

TeeChart for ActiveX, COM and ASP
jbritt
Newbie
Newbie
Posts: 12
Joined: Mon Oct 03, 2011 12:00 am

TeeChart not drawing to a device context

Post by jbritt » Thu May 30, 2013 7:40 pm

Hello,

There is a problem with TeeChart not drawing to a device context. This problem was introduced in v2012.

Below is a code snippet from our OnPaint call (where CChildView is a derived CWnd class).

Code: Select all

void CChildView::OnPaint() 
{
[snip]
      // Draw background
      pDC->FillSolidRect(rclChart, RGB(0xff, 0xff, 0xff));
      ...

      // Draw Chart
      HDC hdc = pDC->m_hDC;
      pChartData->Draw((long)hdc, rclChart.left, rclChart.top, rclChart.right, rclChart.bottom);
[snip]
}
The problem is that the chart is only drawn some of the time (about 60-90% of the time). The rest of the time, only the background is shown. This problem appears in "TeeChart Pro v2012 ActiveX Control" and "TeeChart Pro v2013 ActiveX Control". "TeeChart Pro v2011 ActiveX Control" works fine.

I have attached a program and source code that demonstrates the problem.

To reproduce it:

Register TeeChart2011.ocx
Run SteemaChartBugDemo.exe
-- Resize the window, multiple times, as well as selecting "View->Refresh" from the main window. The page should draw itself as expected.

Now Register TeeChart2012.ocx or TeeChart2013.ocx
Run SteemaChartBugDemo.exe
-- When you resize or refresh the window, you will notice that the chart isn't drawn over the background image all the time. It might work up to 90% of the time, but eventually you will see that the chart isn't drawn on top of the background image.

Let me know if you need any more help in reproducing this bug. Thank you!

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TeeChart not drawing to a device context

Post by Yeray » Fri May 31, 2013 10:31 am

Hello,
jbritt wrote:I have attached a program and source code that demonstrates the problem.
I can't see it. Where did you upload it?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

jbritt
Newbie
Newbie
Posts: 12
Joined: Mon Oct 03, 2011 12:00 am

Re: TeeChart not drawing to a device context

Post by jbritt » Fri May 31, 2013 4:02 pm

I'm sorry. I tried 4 times to upload the attachment, and the website crashed each time. I sent an email to webmaster@teechart.net about it, and I'm hoping it can be resolved. Is there another way I can ftp the source code to you?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: TeeChart not drawing to a device context

Post by Narcís » Mon Jun 03, 2013 7:46 am

Hi jbritt,

You can post your files here.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

jbritt
Newbie
Newbie
Posts: 12
Joined: Mon Oct 03, 2011 12:00 am

Re: TeeChart not drawing to a device context

Post by jbritt » Mon Jun 03, 2013 7:48 pm

Hmm.. The link does not appear to be working either. I tried four different browsers and was unsuccessful each time I clicked on the link. I was never given a cue to enter a file, but got the message "could not connect to www.steema.net".

I'll try again to upload the source code, but this time it will be a smaller subset of the source code, and hopefully this will be enough information for you to build the demo program. When I tried to upload a zip file of the entire source I kept getting the message "Internal Server Error". When I tried to upload a single file, I got messages such as "The extension .cpp is not allowed", (and same result for txt and cpp_ extensions as well). Hopefully this one will work!
Attachments
SrcCodeDemoBug.zip
Source code
(103.76 KiB) Downloaded 1068 times

jbritt
Newbie
Newbie
Posts: 12
Joined: Mon Oct 03, 2011 12:00 am

Re: TeeChart not drawing to a device context

Post by jbritt » Mon Jun 03, 2013 8:11 pm

Yay! It looks like the source code was successfully uploaded. I tried to upload a zipped file of the executable, but it appears that it is too big, so I'm hoping that the source code will be enough to build and reproduce this problem.

This code was built using Microsoft Developer Studio 2010, and you will want to mostly look at the file ChildView.cpp (particularly at the OnPaint() call).

Let me know if there is anything else you'll need to build and reproduce this bug.

Thanks!

jbritt
Newbie
Newbie
Posts: 12
Joined: Mon Oct 03, 2011 12:00 am

Re: TeeChart not drawing to a device context

Post by jbritt » Thu Jun 06, 2013 5:43 pm

Hello,

Could you please give me an update on any progress of fixing this bug? Were you able to build it and reproduce it? Is there an estimate on how long it will take to fix it? If there is any more information you need from our end, we'd be happy to help.

Thank you!

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TeeChart not drawing to a device context

Post by Yeray » Fri Jun 07, 2013 7:04 am

Hi,

I'm sorry for the delay here. We could reproduce the problem with your application and we are investigating what's wrong.
I'm afraid I can't tell you when this will be fixed.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

jbritt
Newbie
Newbie
Posts: 12
Joined: Mon Oct 03, 2011 12:00 am

Re: TeeChart not drawing to a device context

Post by jbritt » Fri Jun 07, 2013 3:18 pm

Thanks for update, and good luck! Please keep us informed.

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TeeChart not drawing to a device context

Post by Yeray » Tue Jun 11, 2013 9:44 am

Hello,

I've seen the chart is always drawn with TeeChart ActiveX v2011.0.0.5 and starts failing some times at v2012.0.0.6.
I've been looking at your application but I'm not sure to understand why do you draw the chart manually at the OnPaint event.
Find attached an example where we create the TChart in a CWnd
MFCCreateTChartComponentOnFormAtRuntime.zip
(30.56 KiB) Downloaded 1055 times
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

jbritt
Newbie
Newbie
Posts: 12
Joined: Mon Oct 03, 2011 12:00 am

Re: TeeChart not drawing to a device context

Post by jbritt » Tue Jun 11, 2013 5:38 pm

Hello,

Thanks for responding, and I hope we can solve this problem soon.

I looked at the sample program that you gave us,but this solution will not work for our us. (The sample that I gave you is a very simple program that demonstrates the problem that we are seeing, but is not our final application).

In our application, we draw several layers of components, and TeeChart is just one of them, and we need to be able to draw to a device context. We used to be able to do that in TeeChart Pro v8 and TeeChart Pro v2011. We noticed that the latest build (Build 2013.0.1.1) demonstrates the problem as well.

Again, good luck in solving this!

Thanks!

Marc
Site Admin
Site Admin
Posts: 1272
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: TeeChart not drawing to a device context

Post by Marc » Wed Jul 24, 2013 3:11 pm

Hello,

As a followup just to let you know that unfortunately we haven't yet found the cause of the problem which is proving very elusive, but that we are still actively investigating.

Regards,
Marc Meumann
Steema Support

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TeeChart not drawing to a device context

Post by Yeray » Fri Jul 26, 2013 1:28 pm

Hello,

We've found a possible fix for this. We'll contact you next Monday to send you a test version.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

jbritt
Newbie
Newbie
Posts: 12
Joined: Mon Oct 03, 2011 12:00 am

Re: TeeChart not drawing to a device context

Post by jbritt » Fri Jul 26, 2013 4:43 pm

Awesome! Thank you, and I'm looking forward to it!

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TeeChart not drawing to a device context

Post by Yeray » Mon Jul 29, 2013 9:17 am

Hi Britt,

I've just sent you a mail with the test version.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply