ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Draw chart on view
Posted by nokiasonic on Aug-27-2012 19:21
I checked the older posts:
http://www.chartdir.com/forum/download_thread.php?
bn=chartdir_support&pattern=cchartview+control&thread=1278935145#N1278948155
But I can't find there is an example "mfcdemo/mfcdemo" included in ChartDirector that uses
CFormView (which is a subclass of CView). I just tried to create control as usual, but when
I use setchart method, I can't see the chart I want appearing on the screen. What else do
I need to do?

  Re: Draw chart on view
Posted by Peter Kwan on Aug-28-2012 04:14
Hi nokiasonic,

The mfcdemo/mfcdemo sample code in ChartDirector Ver 5.0.x or earlier was based on CFormView. In the latest version, we have changed it to use CDialog.

I have just uploaded the mfcdemo/mfcdemo sample code from the previous version of ChartDirector, modified to link to "chartdir51.dll" (the latest version), to our web site as follows. This version is using CFormView.

http://www.advsofteng.com/test51.zip

I do not remember we need to do anything special to display the chart in CFormView. May be you can try the mfcdemo/mfcdemo to see if it works in your case. If you need further help, is it possible to prepare a sample MFC project (eg. just creating somethig like the "helloworld" sample code but with CFormView) that has the issue, and attach it with your message (note: the forum has a 250 Kbyte attachment limit), or email to me at pkwan@advsofteng.net?

Regards
Peter Kwan

  Re: Draw chart on view
Posted by nokiasonic on Aug-28-2012 09:57
Thanks a lot. BTW, Is it possible to use CView instead of CFormview?

  Re: Draw chart on view
Posted by nokiasonic on Aug-28-2012 11:39
I found the answer in older post. When I create picture control, I need set it to "BITMAP"
by using code like this:
myChartViewer.Create(0, WS_CHILD | WS_VISIBLE | SS_BITMAP | SS_NOTIFY, CRect(0, 0,
0, 0), this, 1);

  Re: Draw chart on view
Posted by Peng Yan on Aug-08-2013 18:32
Thanks! This works for drawing on CFormView.