Jump to content
Software FX Community

using ChartFx for 2005 in MFC application


User (Legacy)

Recommended Posts

Hi,

I've download Chart FX for Visual Studio 2005. I am trying to update

our MFC application using it.(we are currently using ChartFX 98) First

I want to see how I can use ChartFX .NET control in a MFC application.

So I created a dialog based MFC application using App wizard, I added

CLR support to the project. It build OK. Then I add ChartFX.WinForms

to the project reference.

Then I added #include <afxwinforms.h> in stdafx.h.

Now I added the following line to my dialog header file, since I want

to host .NET control in my dialog.

CWinFormsControl<System::Windows::Forms::ComboBox> m_combo;

The project compile OK.

Now I changed the above line to :

CWinFormsControl<ChartFX::WinForms::Chart> m_Chart;

It gives me compiling error as following. Am I missing anything? Do

you have a sample showing how to use ChartFX NET control in MFC

application. Thanks.

MfcDotNetDlg.cpp

1>C:\Program Files\Microsoft Visual Studio

8\VC\atlmfc\include\afxwinforms.inl(108) : error C2686: cannot

overload static and non-static member functions with the same

parameter types

1> c:\program files\chart fx for visual studio

2005\bin\chartfx.winforms.dll: could be

'System::Resources::ResourceManager

^ChartFX::WinForms::Chart::a(System::String ^,System::Type ^)'

1> c:\program files\chart fx for visual studio

2005\bin\chartfx.winforms.dll: or 'System::Resources::ResourceSet

^ChartFX::WinForms::Chart::a(System::String ^,System::Type ^)'

1> This diagnostic occurred while importing type

'ChartFX::WinForms::Chart ' from assembly 'ChartFX.WinForms,

Version=7.0.2138.21696, Culture=neutral,

PublicKeyToken=a1878e2052c08dce'.

1> C:\Program Files\Microsoft Visual Studio

8\VC\atlmfc\include\afxwinforms.inl(107) : while compiling class

template member function 'HWND

Microsoft::VisualC::MFC::CWinFormsControl<TManagedControl>::GetControlHandle(void)

const'

1> with

1> [

1> TManagedControl=ChartFX::WinForms::Chart

1> ]

1> C:\Program Files\Microsoft Visual Studio

8\VC\atlmfc\include\afxwinforms.inl(154) : while compiling class

template member function 'BOOL

Microsoft::VisualC::MFC::CWinFormsControl<TManagedControl>::CreateManagedControl(DWORD,int,CWnd

*)'

1> with

1> [

1> TManagedControl=ChartFX::WinForms::Chart

1> ]

1> C:\Program Files\Microsoft Visual Studio

8\VC\atlmfc\include\afxwinforms.inl(78) : while compiling class

template member function

'Microsoft::VisualC::MFC::CWinFormsControl<TManagedControl>::CWinFormsControl(void)'

1> with

1> [

1> TManagedControl=ChartFX::WinForms::Chart

1> ]

1> c:\jing\mfcdotnet\mfcdotnet\MfcDotNetDlg.h(25) : see reference to

class template instantiation

'Microsoft::VisualC::MFC::CWinFormsControl<TManagedControl>' being

compiled

1> with

1> [

1> TManagedControl=ChartFX::WinForms::Chart

1> ]

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...