开发者

Windows API and MFC coding style specifications

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 ap开发者_StackOverflow中文版i the specific style pertains to.

Thanks!


"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.


Maybe those can help:

Hungarian Notation

Making Wrong Code Look Wrong

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜