True Colour Developer Studio Addin - Use any colour in the Developer Studio IDE


Desktop-as-a-Service Designed for Any Cloud ? Nutanix Frame

Environment: Visual C++ 6

Ever got frustrated with only being able to use 16 colours in the developer studio IDE? A solution to the problem was posted to codeguru recently (in the tips section) that addressed this by hacking the registry, but this required restarting the IDE to update the colours.

DevTrueColour is an addin that customizes the Tools | Options | Format tab, hiding the 16 colour combo boxes and replacing them with two Office 97 style colour pickers (courtesy of Chris Maunder). All editor windows are updated without restarting the IDE


  1. Build the DevTrueColour.dsp project OR copy DevTrueColour.dll into program files\microsoft visual studio\common\msdev98\addins
  2. Open Tools | Customize | Add-ins and Macro Files and tick DevTrueColour.
  3. Tools | Options | Format. You should have 2 replacement combo boxes for the colours
Note that the files colourpicker.cpp/.h and colourpopup.cpp/.h are identical copies of the colour picker control source by Chris Maunder which can also be found on codeguru.


Under certain circumstances, the colour pickers don't update. This seems to be due to having different colours for items that appear in more than one category. Eg. If Bookmark is set to red in Output Window and green in Source Windows, then All Windows is selected, the colour pickers don't update. This appears to be a feature of Developer Studio, as it happens without the addin enabled!

I have only been able to test the addin in VC6.0. It should work in 5.0, but if it doesn't you are welcome to fix it and I will incorporate any changes into the original.

How it works:

The colour combo boxes on the Format page are owner draw controls, with the item data containing a COLORREF, or 0x8000000 if Automatic is selected. It we can change the item data value we can use the combo box as a means of injecting any colour we want into developer studio.

On loading, the addin registers a thread wide window proc hook, which it uses to wait for WM_INITDIALOG on the Format tab of the options. Unfortunately the title of the Format child dialog isn't set at this point, so we have to use the existence of a couple of child controls to verify the identity of the page.

The original combo boxes are hidden, and the colour picker combo's are created. I had to put these in modeless child dialogs to get message reflection to work, which is a bit messy, but this had the side effect of allowing easier access to the colour picker notification messages.

Whenever the colour picker closes, the corresponding hidden combo box has item 0's data set to the new colour and a couple a fake key presses sent to it (VK_END followed by VK_HOME) to update the sample text.

The hook procedure also catches CB_FINDSTRINGEXACT, which is used to update the colour pickers, and WM_DESTROY, which is used for cleaning up when the property sheet is closed.

Download source - 30K

Download AddIn DLL - 17K

Date Last Updated: April 19, 1999


  • Binary works build doesn't

    Posted by Legacy on 11/13/2001 08:00am

    Originally posted by: Brandon Cline

    Hey, When I build the file from source, it doesn't work but using the pre-built one does.

    My IDE is VC++ 6.0 Learning Edition

  • For German User..

    Posted by Legacy on 03/28/2001 08:00am

    Originally posted by: Michael Schikora

    It works well with this minor changes
    in "TrueColourEngine.cpp":

    //const TCHAR* FOREGROUND_STATIC_TEXT = _T("F&oreground:");
    //const TCHAR* BACKGROUND_STATIC_TEXT = _T("&Background:");
    const TCHAR* FOREGROUND_STATIC_TEXT = _T("V&ordergrund:");
    const TCHAR* BACKGROUND_STATIC_TEXT = _T("&Hintergrund:");

    Danke und Tsch��

  • Font Dialog

    Posted by Legacy on 10/19/2000 07:00am

    Originally posted by: Wojtek Ganczarski

    Great Add-in!
    Have you ever thought about extend it for using italic and bold font?

  • Other DevStudio tabs

    Posted by Legacy on 04/26/1999 07:00am

    Originally posted by: David Peterson

    INCREDIBLE! Since you've obviously mastered hooking messages, I thought I'd ask you a question about it. I have a HUGE need to manipulate the directory listing under the "Directories" tab. So within your OnInitDialog code (and using Spy++), I can determine if the Directories dialog is the one being initialized. I can manipulate all controls on that dialog except for the Directory list. I can't figure out why. I'm doing a GetDlgItem(hdlg,0x00003EA5) (which is the ID I see in Spy++) and nothing comes back. Any ideas?

    Thank you VERY much in advance. Again, I'm impressed by the possibilities you've just introduced to me.

    David Peterson
    Atlanta, GA

  • About the workspace thing...

    Posted by Legacy on 04/24/1999 07:00am

    Originally posted by: JimB0

    First I must say it's a major eurgonomic victory!!

    The reason for the crash I belive is because with out the plug-in the "Forground" and "Background" combo boxes are dissabled. That is to say they cannot be set. For whatever reason Microsoft didn't feel like implementing this for the workspace window (or the tree controls within).

  • Amazing.

    Posted by Legacy on 04/21/1999 07:00am

    Originally posted by: Jignesh Patel

    Simply excellent. :)


  • Oh Yeah...

    Posted by Legacy on 04/20/1999 07:00am

    Originally posted by: Anton Bazarsky

    Thank you very much, this is so great...

  • You must have javascript enabled in order to post comments.

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

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date