Windows API 和 MFC 编码风格规范

发布于 2024-10-09 10:40:34 字数 171 浏览 0 评论 0原文

我在哪里可以找到完整的规范和指南/惯例 Windows API 和 MFC 编程的编码风格。可以看出 MS code 他们明确遵循严格的编码风格和约定,例如 匈牙利表示法和驼峰命名法。 如果您碰巧从经验中了解它们,请随意总结它们 就在这里。 如果可以的话,请明确区分具体是哪个api 风格属于.

谢谢!

Where can i find complete specifications and guidelines/conventions on
coding styles for Windows API and MFC programming. As one can see from
MS code they clearly follow strict coding styles and conventions like
Hungarian notations and CamelCase.
If you happen to know them from experience, feel free to summarize them
right here.
If you can, please make a clear distinction as to which api the specific
style pertains to.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

拔了角的鹿 2024-10-16 10:40:34

“他们显然遵循严格的编码风格和约定”......实际上这取决于项目。 Windows Shell 团队遵循非常严格的编码约定,Office 遵循另一个约定,其他团队根本没有太多约定。 MSDN 团队也有他们自己在 MSDN 文档中使用的约定。这一切都取决于团队。

如今,匈牙利表示法在开发人员部门中不再受欢迎(请注意,链接文本 CLR 编码约定明确禁止使用匈牙利语(第 2.6 节,第一个项目符号)),但仍在应用程序部门中使用。

CLR 编码指南是一个非常好的、全面的编码约定示例。我的建议是,你们应该作为一个团队坐下来,找出适合你们所有人的方法。

"they clearly follow strict coding styles and conventions"... Actually it depends on the project. The Windows Shell team follows a very strict coding convention, Office follows another, other groups don't have much of a convention at all. The MSDN team also has their own conventions that they use in MSDN documentation. It all depends on the team.

These days, hungarian notation is out of favor in the developer division (note that thlink texte CLR coding conventions explicitly ban the use of hungarian (section 2.6, first bullet)), but is still used in the applications division.

The CLR coding guidelines are a pretty good and comprehensive example for coding convention. My recommendation is that you should sit down as a team and figure out something that works for all of you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文