Can I add MFC support to an Existing ATL COM project

落花浮王杯 提交于 2020-01-11 13:28:26

问题


I have created a Shell Extension using ATL COM Object . But during creation I haven't added MFC support. Can I change the setting now to add MFC support


回答1:


Yes, but I believe that doing this won't auto-add all the required headers and #defines - of course, you could try this first, and check to be sure.

If that does not work, you could use 'File->New->Project from Existing Code' to create a new project in your solution that uses both MFC and ATL, using the code in your original project. You would have to include any custom settings from your current ATL-only version, but if you let a new precompiled header be created in the new project, it should have all the MFC and ATL bits you need turned on and included.




回答2:


Yes, there is a knowledge base article that says how to do this. In short, you basically have to add certain #includes and create an application object, along with some plumbing.



来源:https://stackoverflow.com/questions/3932487/can-i-add-mfc-support-to-an-existing-atl-com-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!