Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

.rc Files and TEXTINCLUDE

nyanpasu64 edited this page Jun 7, 2018 · 1 revision

Quoted from TN035:

When Visual C++ reads the #include'd .RC file, it merges the #include'd resources into the parent .RC file. When you save the parent .RC file, the #include statement, in effect, will be replaced by the #include'd resources.

Visual C++ recognizes three specific TEXTINCLUDE resources that have the resource identification numbers 1, 2 and 3:

  1. Symbol Header File
  2. Read-Only Symbol Directives
  3. Compile-Time Directives

TEXTINCLUDE

.rc files have 3 hard-coded TEXTINCLUDE regions.

TEXTINCLUDE-generated code gets discarded by the GUI (via #ifndef APSTUDIO_INVOKED statements), and regenerated from TEXTINCLUDE upon saving(?) (via #ifdef APSTUDIO_INVOKED).

TEXTINCLUDE is used to protect #include statements from being expanded by the GUI.