65.9K
CodeProject is changing. Read more.
Home

Inactive code block doesn't lose color - it would be color faded

emptyStarIconemptyStarIconemptyStarIconemptyStarIconemptyStarIcon

0/5 (0 vote)

Apr 23, 2010

CPOL
viewsIcon

12561

Unlike previous version of Visual Studio (2005, 2008), which used to display inactive code block in grayed mode, the new version - VS 2010 - would display them in faded down color (core colors will be preserved).For example:#ifdef _DEBUGvoid CClass::AssertValid(){ ASSERT(this); ...

Unlike previous version of Visual Studio (2005, 2008), which used to display inactive code block in grayed mode, the new version - VS 2010 - would display them in faded down color (core colors will be preserved). For example:
#ifdef _DEBUG
void CClass::AssertValid()
{ 
   ASSERT(this);
   // Some code
}
#endif
Will be displayed in same color, but with color intensity down - if _DEBUG is not defined. Obviously, it is applicable for all languages that have conditional compilation thing. Try yourself!