More colors in Visual C++ Editor

Environment: This Registry hack works exactly as described in this article for Visual C++ 6.0 and is very similiar for Visual C++ 5.0

I am very picky about my colors in my code editor. When I first got VC++ and saw that it only only allowed me to pick from 16 colors, I couldn't stand it. So I figured out how to alter the colors outside of Visual Studio. This can be done in the registry.

Go into the Registry using RegEdit and view the folowing Key:

HKEY_CURRENT_USER\Software\Microsoft\Developer\Format\ In this Key there are SubKeys for all color and font options for each type of window in Visual C++. Open the 'Source Window' subKey. The 'Source Window' is where you edit your code text. The 'Text' Entry is a string of Hexadecimal Bytes. The first three hex bytes represent the foreground RGB color. The 2nd set of three hex bytes represent the Background RGB color. Change these here and you can specify any color that your display can handle. Very cool!!!! You can specify your keyword colors, hilight colors, etc.

Close and restart Visual Studio. It reads the color values from the registry on startup. Now you can pick from alot more than 16 colors.

If you want to you can save you colors to a .reg file. Select the proper registry key so that it is highlighted. Click on Registry and export registry file. Save it as something like VCcolors or something like that. If you ever need to reinstall VC++ just doble click on you VCColors.reg file and the proper colors are restored. This is also cool for when you work at home and work so that your color settings will be the same on both computers. Here is my reg file with my colors that I use: REGEDIT4


[HKEY_USERS\.Default\Software\Microsoft\Devstudio\6.0\Format\Source Window]
"FontFace"="Comic Sans MS"
"FontSize"=dword:00000009
"Text"=hex:c0,80,c0,00,00,00,00,00,12,01,b2,00
"Text Selection"=hex:00,00,00,00,c0,80,c0,00,19,00,19,00
"Current Error/Tag"=hex:ff,ff,ff,00,00,00,80,00,d2,01,b2,01
"Bookmark"=hex:00,00,00,00,00,ff,ff,00,10,00,10,00
"Breakpoint"=hex:ff,ff,ff,00,80,00,00,00,10,00,10,00
"Current Statement"=hex:00,00,00,00,ff,ff,00,00,70,00,70,00
"Selection Margin"=hex:d8,e0,f0,00,d8,e0,f0,00,13,00,13,00
"Keyword"=hex:00,ff,00,00,00,00,00,00,10,00,10,00
"Comment"=hex:ff,ff,00,00,00,00,00,00,10,00,11,00
"Number"=hex:ff,00,00,00,00,00,00,00,10,00,11,00
"String"=hex:ff,00,00,00,00,00,00,00,10,00,11,00
"Operator"=hex:00,ff,00,00,00,00,00,00,10,00,11,00
"Wizard IDL/ODL Code"=hex:80,80,80,00,00,00,00,00,14,00,15,00
"HTML Element Name"=hex:c0,80,c0,00,00,00,00,00,14,00,15,00
"HTML Attribute Name"=hex:00,ff,00,00,00,00,00,00,14,00,15,00
"HTML Attribute Value"=hex:ff,00,00,00,00,00,00,00,14,00,15,00
"HTML Comment"=hex:ff,ff,00,00,00,00,00,00,14,00,15,00
"HTML Entity"=hex:ff,c0,40,00,00,00,00,00,14,00,15,00
"HTML Tag Delimiter"=hex:00,ff,00,00,00,00,00,00,14,00,15,00
"HTML String"=hex:ff,00,00,00,00,00,00,00,14,00,15,00
"HTML Tag Text"=hex:ff,00,ff,00,00,00,00,00,14,00,15,00
"HTML Operator"=hex:00,ff,00,00,00,00,00,00,14,00,15,00
"HTML Server-Side Script"=hex:00,00,00,00,ff,ff,00,00,14,00,14,00
"Wizard Code"=hex:80,80,80,00,00,00,00,00,14,00,15,00
"User Defined Keywords"=hex:00,00,ff,00,00,00,00,00,14,00,15,00
You can copy the reg text above to a text file and rename it so that it has an extension .reg. Then double click on it. You will see the colors I use. You could also just change the colors through this reg file to suit your tastes.

Date Last Updated: April 4, 1999



Comments

  • wjJBD HYY dKlS

    Posted by nQsBrYBrbP on 11/15/2012 04:40pm

    buy soma carisoprodol from india - soma drug information

    Reply
  • it doesn't work for the Workspace Window

    Posted by Legacy on 07/25/2003 12:00am

    Originally posted by: Martin

    I've tried to change the colors for the Source Window and it works but not for the Warkspace Window.

    Any idea of how to change this second one.
    Thanks.
    Martin

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Agile development principles have gone from something used only by cutting-edge teams to a mainstream approach used by teams large and small. If you're not using agile methods already though, or if you've only been exposed to agile on small projects here and there, you may wonder if agile can ever work in your environment. Read this eBook to learn the fundamentals of agile and how to increase the productivity of your software teams while enabling them to produce higher-quality solutions that better fulfill …

  • Live Event Date: August 20, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT When you look at natural user interfaces as a developer, it isn't just fun and games. There are some very serious, real-world usage models of how things can help make the world a better place – things like Intel® RealSense™ technology. Check out this upcoming eSeminar and join the panel of experts, both from inside and outside of Intel, as they discuss how natural user interfaces will likely be getting adopted in a wide variety …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds