Demo2
DEMO 

所属分类:Windows编程
开发工具:Visual C++
文件大小:111KB
下载次数:45
上传日期:2010-01-09 21:08:15
上 传 者hpsoar
说明:  一个展示MFC项目使用C#控件Demo,不同语言间的交互
(A Demo, which demonstrate the usage of C# Control in MFC Project)

文件列表:
Demo2\PieChart\MFCDemo\ManagedCode.h (473, 2009-08-21)
Demo2\PieChart\MFCDemo\MFCDemo.aps (57964, 2009-07-30)
Demo2\PieChart\MFCDemo\MFCDemo.cpp (2097, 2009-07-30)
Demo2\PieChart\MFCDemo\MFCDemo.h (510, 2009-07-30)
Demo2\PieChart\MFCDemo\MFCDemo.rc (4961, 2009-07-30)
Demo2\PieChart\MFCDemo\MFCDemo.vcproj (5624, 2009-07-30)
Demo2\PieChart\MFCDemo\MFCDemo.vcproj.Aldrich-PC.hp.user (1417, 2009-08-21)
Demo2\PieChart\MFCDemo\MFCDemoDlg.cpp (4514, 2009-08-21)
Demo2\PieChart\MFCDemo\MFCDemoDlg.h (722, 2009-08-21)
Demo2\PieChart\MFCDemo\res\MFCDemo.ico (21630, 2003-07-23)
Demo2\PieChart\MFCDemo\res\MFCDemo.rc2 (398, 2009-07-30)
Demo2\PieChart\MFCDemo\resource.h (633, 2009-07-30)
Demo2\PieChart\MFCDemo\stdafx.cpp (207, 2009-07-30)
Demo2\PieChart\MFCDemo\stdafx.h (1956, 2009-07-30)
Demo2\PieChart\MFCDemo\targetver.h (1432, 2009-07-30)
Demo2\PieChart\MFCTest\ManagedCode.cpp (28, 2009-07-17)
Demo2\PieChart\MFCTest\ManagedCode.h (623, 2009-07-30)
Demo2\PieChart\MFCTest\MFCTest.cpp (1662, 2009-07-16)
Demo2\PieChart\MFCTest\MFCTest.h (447, 2009-07-16)
Demo2\PieChart\MFCTest\MFCTest.rc (4311, 2009-07-17)
Demo2\PieChart\MFCTest\MFCTest.vcproj (6044, 2009-07-30)
Demo2\PieChart\MFCTest\MFCTest.vcproj.Aldrich-PC.hp.user (1417, 2009-08-21)
Demo2\PieChart\MFCTest\MFCTest.vcproj.HP.Aldrich.user (1401, 2009-07-24)
Demo2\PieChart\MFCTest\MFCTestDlg.cpp (3908, 2009-07-20)
Demo2\PieChart\MFCTest\MFCTestDlg.h (756, 2009-07-17)
Demo2\PieChart\MFCTest\PieChartAux.cpp (902, 2009-07-17)
Demo2\PieChart\MFCTest\PieChartAux.h (434, 2009-07-17)
Demo2\PieChart\MFCTest\res\MFCTest.ico (21630, 2005-12-08)
Demo2\PieChart\MFCTest\res\MFCTest.rc2 (363, 2009-07-16)
Demo2\PieChart\MFCTest\resource.h (541, 2009-07-17)
Demo2\PieChart\MFCTest\stdafx.cpp (138, 2009-07-16)
Demo2\PieChart\MFCTest\stdafx.h (2489, 2009-07-16)
Demo2\PieChart\PieChart\AssemblyInfo.cs (2524, 2006-03-13)
Demo2\PieChart\PieChart\DataTypes.cs (2015, 2009-07-17)
Demo2\PieChart\PieChart\GraphicsUtil.cs (2359, 2006-03-13)
Demo2\PieChart\PieChart\obj\PieChart.csproj.FileListAbsolute.txt (725, 2009-07-20)
Demo2\PieChart\PieChart\PieChart.cs (46064, 2009-07-17)
Demo2\PieChart\PieChart\PieChart.csproj (4641, 2009-07-30)
... ...

how to: 1. the ManagedCode.h file should be included where you want to use PieChart3D or PieChartControl, because necessary headers and namespaces are included or declared as using here; 2. when use PieChartControl, the variable should be stated like this(see the 19th line in MFCDemoDlg.h): CWinFormsControl m_pieChartControl; as to other WinFormsControl, just substitute what's surrounded by '<' and '>'; The following line shold be added to DoDataExchange(some comment is added to MFCDemoDlg.cpp) Microsoft::VisualC::MFC::DDX_ManagedControl(pDX, IDC_PLACEHOLDER, m_pieChartControl); the IDC_PLACEHOLDER is the ID for m_pieChartControl 3. when pass data to PieChart3D, you should use classes defined in DataTypes.cs(for this demo). this is to solve type problems. And for now double value is used as decimal, it's ok if precision requirement is not that critical. 4. you can see MFCTestDlg.h and MFCTestDlg.cpp for details 5. set the project with /clr support 6. Use of MFC should be set as "Use MFC in a Shared DLL" platform windows xp & visual studio 2005 platfor windows 7 & visual studio 2008(without sp1) demonstrate how to use WinForm controls(C#) in MFC(C++)

近期下载者

相关文件


收藏者