I\'m programming in C++ on Visual Studio 2005. My question deals with .rc files. You can manually place include directives like (#include \"blah.h\"), at the top of an .rc
Add your #include to the file in the normal way, but also add it to one the three "TEXTINCLUDE" sections in the file, like so:
2 TEXTINCLUDE
BEGIN
"#include ""windows.h""\r\n"
"#include ""blah.h\r\n"
"\0"
END
Note the following details:
Statements placed in the "1 TEXTINCLUDE" block will be written to the beginning of the .rc file when the file is re-written by the resource editor. Statements placed in the 2 and 3 blocks follow, so you can guarantee relative include file order by using the appropriately numbered block.
If your existing rc file does not already include TEXTINCLUDE blocks, use the new file wizard from the Solution Explorer pane to add a new rc file, then use that as a template.