我可以在VS2010中将类导入到ClassWizard中吗
VS2010中有没有一种方法可以将.h和.cpp文件中的类导入到ClassWizard中,以便我可以使用ClassWizard来操作它(例如添加变量等...)我带入项目的相当多的文件当我从 VS2008 转移过来时,ClassWizard 似乎不可用。回到 VS6,我可以通过 手动执行此操作编辑 CLW 文件,但这不再可用。请参阅相关问题
我猜测存储此信息的文件是MyProjectName.sdf,它是列为 SQL Server Compact Edition 数据库文件资源管理器,但我不确定是否有任何可用工具可以让我编辑它。
Is there a way in VS2010 to import a class from a .h and .cpp file into ClassWizard such that I can use ClassWizard to manipulate it (e.g. add variables etc...) Quite a number of the files that I brought into the project when I moved over from VS2008 do not seem to be available to ClassWizard. Back in VS6, I could do this by manually editing the CLW file, but this is no longer available. See related question
I'm guessing the file that stores this information is MyProjectName.sdf, which is listed as a SQL Server Compact Edition Database File by explorer, but I'm not sure if there are any tools available that would let me edit it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
想出了一个解决方法。我的预感是,当现有文件添加到项目中时,VS2010 正在读取 //{{AFX_DATA(CMyClass) 注释,因此我执行了以下操作;
另一个类
除了经常使用的类之外,工作量太大,对其他任何东西都没有多大好处,可能只是组合一个例程来集体执行此操作,即搜索具有基于已知 MFC 类的类的项目文件,搜索缺少 AFX 注释的情况如果不存在则添加它们,说十个万岁玛丽并启动 ClassWizard。
还发布在MSDN 此处
Figured a workaround. My hunch was that VS2010 was reading the //{{AFX_DATA(CMyClass) comments when existing files are added into a project, so I did the following;
another class
A bit too much work to be of much benefit on anything other than regularly used classes, might just put together a routine to do this en-masse, i.e. search for project files with classes based on known MFC classes, search for absence of AFX comments and add them if not present, say ten hail marys and fire up ClassWizard.
Also posted on MSDN here