Specifying Project Settings with Property Pages
A project's properties specify how a project is built and debugged. The options chosen in a project's Property Pages dialog box can be applied to multiple projects but apply only to the selected project configuration. For instance, you can specify settings for the Release configuration that do not apply to the Debug configuration. You can also specify that settings be applied to all current project configurations.
Property pages are dynamic, and the pages that display depend upon the type of files in the project. For example, if you do not have an IDL file in your project, then the IDL property page will not display in the Property Pages dialog box.
See Setting Visual C++ Project Properties for information on how to access a project's Property Pages dialog box.
Some properties give you a simple yes or no choice, while other properties let you choose from a list.
Default vs. Modified Properties
You will notice that some property values appear in bold. This means that the value was changed. The default for a property at the project level (when the project node is selected in Solution Explorer) is commonly the default value of that property for the tool. For example, by default, in a Win32 project, notice in the compiler's Code Generation property page that the property Enable String Pooling is initially set to No (does not appear in bold). This means that No agrees with the project's default. If you were to use CL.exe at the command line, /GF would not be in effect unless you specified it.
If you or the application wizard change a property, the value appears in bold. For example, on the same Code Generation property page, notice that /RTC1 is in effect for the Full Runtime Checks property. At the command line, /RTC1 is not in effect by default; in this case, the application wizard changed the project's default setting for the property.
A subset of the project defaults is exposed and available for you to modify; see the Project Defaults section in General Property Page (File).
When you view a project's Property Pages dialog box and when the project node is selected in Solution Explorer, for each property you will also have the option to select <inherit from project defaults>.
Click Apply to ensure that the Property Pages dialog box is refreshed with your latest choices when you reset a property to the project's default.
When you view a project's Property Pages dialog box and when a file is selected in Solution Explorer, a property value that appears in bold indicates that the value of the property at the file level has been changed. Accordingly, for each property you will also have the option to select <inherit from project>. If many files have properties that were modified, the time to build the project will increase.
The project defaults are system (platform) defaults, for the most part. Some project defaults derive from the style sheets that are applied when you update properties in the Project Defaults section of the general project configuration page (see General Property Page (Project)).
Entering User-Defined Values
Other properties require you to specify values for the property. Some of these properties take one or more values (multi-properties) and other properties take one value (single properties).
It is possible to type directly in the right column of the property page. Separate values with a semicolon. Use only alphabetic and numeric characters for these properties. No error checking is performed on these values.
You also can select <Edit...> from the drop-down list (for single properties) or the browse button (for a selected multi-property). This opens a dialog box where you can enter a value or values for the property. This dialog box's title will be the same as the name of the property you are editing. For multi-properties, enter one value per line, using a carriage return after each value.
Edit boxes for multi-properties will have a check box labeled inherit from project (for a file) or inherit from project defaults (at the project level). This check box is selected by default, meaning that the property can inherit values from the project, if a file is selected, or from the project defaults, if the project is selected in Solution Explorer.
Note that the displayed values for a multi-property in the property page dialog box only reflect the property settings at the current level. For example, if a file is selected in the Solution Explorer and you select the C/C++ Preprocessor Definitions property, the property page will not display any preprocessor definitions at the project level. However, if you open the edit box for the multi-property, you can see all inherited values for the property.
If you use the Visual C++ Project Model, be aware that this behavior is also in effect for the objects on files and projects. That is, when querying for the values on a property at the file level, you will not get the values for that same property at the project level; you'll need to explicitly get the values of the property at the project level. Be aware that some inherited values of a property may come from a style sheet, which is not accessible programmatically for this release.
The $(Inherit) and $(NoInherit) Macros
Note that two macros can be used for properties where you specify user-defined values:
Clearing the check box (for example, inherit from project defaults) is the same as specifying $(NoInherit); using the check box is easier. If you specify $(NoInherit), you may very well want to still specify your own values.
Regardless of the setting for the inherit from project (or inherit from project defaults) check box, if you use either of these macros in the edit box, the setting of the check box is ignored.
If you do use $(NoInherit) on a property, be aware if one of the project defaults affects the property. If it does, you can unintentionally override a project default that you specified.