Drawing to a canvas from OnAfterDraw handler not working

TeeChart for ActiveX, COM and ASP
Post Reply
jhameenniemi
Newbie
Newbie
Posts: 17
Joined: Mon Apr 15, 2013 12:00 am

Drawing to a canvas from OnAfterDraw handler not working

Post by jhameenniemi » Thu Dec 05, 2013 7:45 am

Drawing to a TeeChart canvas from an OnAfterDraw event does not work anymore when GetEnvironment()->InternalRepaint() is called. Any drawing done from OnAfterDraw event handler to a canvas during InternalRepaint call is displayed only after series data is changed. Forcing window repaint using Invalidate(), RedrawWindow() etc. does not work, series data has to be changed for anything drawn to the canvas to be displayed.

Example app included.

- Tero
Attachments
TeeTest.zip
(81.79 KiB) Downloaded 946 times

jhameenniemi
Newbie
Newbie
Posts: 17
Joined: Mon Apr 15, 2013 12:00 am

Re: Drawing to a canvas from OnAfterDraw handler not working

Post by jhameenniemi » Thu Dec 05, 2013 9:50 am

Ok, I found a solution myself. TeeChart's Repaint() does the trick. The code was originally written for v8 which worked with InternalRepaint() just fine.

- Tero

Post Reply