Skip to content

Commit

Permalink
#define APSTDIO_HIDDEN_SYMBOLS
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed Mar 18, 2018
1 parent b4a0366 commit dde1299
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Standardize.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <windows.h>
#include <commctrl.h>
#undef APSTUDIO_HIDDEN_SYMBOLS
```

The contents of file "resource.h" should end with the text like:

```c
Expand Down
2 changes: 2 additions & 0 deletions src/RisohEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <windows.h>\r\n");
file.WriteFormatA("#include <commctrl.h>\r\n");
file.WriteFormatA("#undef APSTUDIO_HIDDEN_SYMBOLS\r\n");
file.WriteFormatA("#pragma code_page(65001) // UTF-8\r\n\r\n");

// get languages
Expand Down

0 comments on commit dde1299

Please sign in to comment.