MS VC++ 6级法师
好的,我正在开发一个应用程序,该应用程序在过去 16 年里一直在持续开发,从 DOS 中的 C,到各种风格的 C++,现在主要基于带有 MFC 和 StingRay GUI 以及各种其他 SDK 的 C++。
虽然我使用 VS 2005 进行发布构建,但我仍然使用 MSVC 6 进行大部分 GUI 构建,只是因为 ClassWizard 在这种环境中比随后的弱等效工具要快得多。 请注意,我使用 ClassWizard 自动为我自己的用户定义类型生成代码(请参阅 自定义 DDX),我喜欢一次性添加很多成员变量和方法。 对我来说,按照更高版本的 Visual Studio 一次创建一个是一个很大的倒退。 同时,使用多个 IDE 也是一种痛苦。
我的问题分为两部分;
有什么方法可以让 ClassWizard 在 VS 2005 或 VS 2008 中工作吗?
替代或替代 IDE 是否会为像我这样的老 C++ 黑客提供类似的生产力水平?
替代或替代 IDE 是否会为像我这样的老 C++ 黑客
Ok, I'm developing an application that has been in pretty much continous development over the last 16 years, from C in DOS, through various flavours of C++ and now is largely based around C++ with MFC and StingRay GUIs and various other SDKs.
While I use VS 2005 for the release builds, I still use MSVC 6 for much of the GUI building, simply because ClassWizard is so much quicker in this environment than the weak equivalent tools that followed. Note that I am using ClassWizard to automatically generate code for my own user defined types (see Custom DDXs) and I like to add a lot of member variables and methods in one go. Creating them one at a time as per later versions of Visual Studio for me is a big backward step. At the same time, working with multiple IDEs is also a pain.
My question is in two parts;
Is there any way of getting ClassWizard to work is VS 2005 or VS 2008?
Is there any drop in replacement, or alternative IDE, that provides similar levels of productivty for old C++ hacks such as myself?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我还建议您将必要的 DDX/DDV(以及消息处理)宏(和成员变量)手动放入您的类中。 一开始,要弄清楚应该如何以及在哪里准确地编写条目似乎有点困难,但不久之后就变得相当容易了。 我在将 VC6 项目移植到 VS2005 后开始这样做,并且出于与您给出的完全相同的原因:ClassWizard 没有合适的替代品。 然而,两年后我可以说我不再怀念它了。
I would also suggest you put the neccessary DDX/DDV (as well as message handling) macros (and member variables) manually into your classes. At first it seems a bit difficult to find out how and where exactly one is supposed to write the entries, but after a short while it's rather easy. I started doing that after porting a VC6 project over to VS2005, and for exactly the same reason you gave: there is no suitable replacement for ClassWizard. However, after two years I can say that I don't miss it at all anymore.
我建议完全避免代码生成,并使用您最喜欢的编辑器手动创建新代码。 如果我理解正确,您是该领域的专家,并且我确信您知道手动创建的代码将比生成的代码更干净、更简单。
此外,代码生成器对于代码审查来说是一场噩梦,它改变了无数根本不应该改变的地方,而且很难集中精力进行有意义的改变。
恕我直言。
I will suggest avoid code generation at all and use your favorite editor to manually create new code. If i understand correctly your are expert in this area and i sure you know that manually created code will be much cleaner and simpler then the generated one.
In additional the code generator is a nightmare for code reviews, it change zillions of places that should not be changed at all and it's really hard to concentrate to the meaningful changes.
IMHO.
同意 Shane 的观点,vs2008 中的 CW 替代方案非常糟糕; 这让你想知道 Microsoft 是否还有人使用 MFC。 我开始提高我的估计只是因为 afx/mfc 集成普遍较差。 它只是还没有完成,而且还有很多问题。 当然,你可以手工编写代码,没有人声称它很难,但很严肃,它的代码很繁琐,它是 2010 年的,你只是不应该再手工编写这些东西了。
Agree with Shane, the CW alternative in vs2008 is shockingly poor; it makes you wonder if anybody at Microsoft still uses MFC. I’ve started bumping my estimates up just because of the generally poor afx/mfc integration. It’s just not finished and what is there is pretty buggy. Sure you can put the code in by hand, nobody is claiming its hard but seriously, its grunt code, its 2010, you just shouldn’t be writing this stuff by hand anymore.
您可以在表单上编写单击控件并添加变量或事件处理程序。 虽然不如 VC6 但仍然好。 我认为手动编写 DDX 没有任何意义。
You can write click on controls on form and add variable or event handler. It is not as good as VC6 but still. I do not see any point in writing the DDX manually.
有兴趣的朋友可以继续关注。 ClassWizard 可能会在 VS2010 中重新引入,来自 Tarek Madkour [VC++ 团队]
单击此处查看完整讨论
编辑:VS2010 的发行说明 确认 MFC 类向导又回来了。 因此,与普遍看法相反,微软的员工确实倾听用户的意见。
A follow up to those who are interested. ClassWizard may be re-introduced in VS2010, from Tarek Madkour [VC++ Team]
Click here for the full discussion
Edit: The release notes for VS2010 confirm that MFC Class Wizard is back. So contrary to popular belief, the guys at MS do listen to their users.