diff --git a/Standardize.md b/Standardize.md index bcb30d12..0a845e91 100644 --- a/Standardize.md +++ b/Standardize.md @@ -34,6 +34,15 @@ Here, "TheProject.rc" must be replaced with the actual resource file name for th File "resource.h" should not use include guard. +If the rc file has #include's of the system headers, then the includes should be wrapped as follows: + +```c +#define APSTUDIO_HIDDEN_SYMBOLS +#include +#include +#undef APSTUDIO_HIDDEN_SYMBOLS +``` + The contents of file "resource.h" should end with the text like: ```c diff --git a/src/RisohEditor.cpp b/src/RisohEditor.cpp index d80c0b18..99c892d4 100644 --- a/src/RisohEditor.cpp +++ b/src/RisohEditor.cpp @@ -5191,8 +5191,10 @@ BOOL MMainWnd::DoWriteRC(LPCWSTR pszFileName, LPCWSTR pszResH) // dump header if (pszResH && pszResH[0]) file.WriteFormatA("#include \"resource.h\"\r\n"); + file.WriteFormatA("#define APSTUDIO_HIDDEN_SYMBOLS\r\n"); file.WriteFormatA("#include \r\n"); file.WriteFormatA("#include \r\n"); + file.WriteFormatA("#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"); file.WriteFormatA("#pragma code_page(65001) // UTF-8\r\n\r\n"); // get languages