在VC6.0中Add Class...\From a type Library... ,现在在VC.NET2003中欲同样的类似加入文件,不知对应如何操作???

解决方案 »

  1.   

    In Solution Explorer, right-click your project, and then click Add Class. Click MFC Class from Typelib, and then click Open. Click Add a class from: Registry, and locate the registered type library for your Automation server. For example, select "Microsoft Excel 10.0 Type Library" for Microsoft ExcelXP or "Microsoft Excel 9.0 Type Library" for Microsoft Excel 2000. Select the interface(s) that you need from the list, and then click the greater than symbol (>) to add them to the list of interfaces for which MFC creates wrappers. Click Finish when you have added all of the interfaces.Important If there are many interfaces in the type library that you chose, select only those interfaces that you will use because MFC will generate a separate header file for each selected interface. By minimizing your interface selections, you can avoid unnecessary overhead during file generation and compilation.
      

  2.   

    thank you very much!