![](/img/trans.png)
[英]Why do I have to manually specify the QAction::MenuRole in Qt 5.1?
[英]Why do MFC .rc files sometimes have a manually inserted \0 at the end?
在本文中 ,我注意到在\\ define语句中插入了\\ 0来构建版本字符串。 在维护的某些MFC项目中,我也看到了它。 在将版本资源移入.rc2文件的过程中,我可以使用一个标头包括在所有项目中设置版本,我注意到\\ 0。 在某些情况下,它不会造成任何问题,但是在某些情况下,所生成的编译文件的属性窗口将显示尾随引号(“)。删除\\ 0似乎并没有什么坏处,但是我不明白为什么会这样希望有一些古老的MFC专家了解这一点,可以解释是否建议删除\\ 0。
例:
VALUE "FileVersion", VERSION_STR"\0" // <-- adding it here causes the version to show in the properties dialog as 1, 0, 4, 1" which is odd.
VALUE "InternalName", "DaHelper\0" // <-- what is the \0 for? Isn't it already a string literal null terminated without adding \0?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.