In my .rc file I found that I have the 3 TEXTINCLUDE sections repeated twice, with different content. When I open “Resource Includes”, only the includes from the first 3 sections are shown. I’ve tweaked the .rc a long time ago, so it maybe is a leftover from that.
Can I safely remove the second 3 sections?
I’ve pasted this from my .rc file, you can see how the TEXTINCLUDE sections are repeated (i.e. “3 TEXTINCLUDE” is followed by “1 TEXTINCLUDE”.
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"#include ""res/Pngs.h""\r\n"
"#include ""res/PngsNag.h""\0"
END
3 TEXTINCLUDE
BEGIN
"#include ""afxres.rc"" // Standard components\r\n"
"#include ""res/MyProject.rc2""\r\n"
"#include ""res/Pngs.rc2""\r\n"
"#include ""res/PngsNag.rc2""\0"
END
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
"#define _AFX_NO_OLE_RESOURCES\r\n"
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
"\r\n"
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
"#ifdef _WIN32\r\n"
"LANGUAGE 9, 1\r\n"
"#pragma code_page(1252)\r\n"
"#endif //_WIN32\r\n"
"#include ""res\\MyProject.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
"#include ""afxres.rc"" // Standard components\r\n"
"#endif\r\n"
"\0"
END
This is gunk that’s generated by the graphical resource editor built into Visual Studio. It doesn’t have any effect at runtime, it merely saves state for the editor. You’ll run a serious risk of breaking the editor when you mess with it. Which is okay if you never use the resource editor and always manage resources with a text editor.
There’s a bit of background info in this MSDN article: