[英]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.