Click here to Skip to main content
Click here to Skip to main content

True Colour Developer Studio Addin

, 26 Jan 2000 CPOL
Rate this:
Please Sign up or sign in to vote.
Use any colour in the Developer Studio IDE
  • Download add-in DLL - 18 Kb
  • Download source files - 31 Kb

    Sample Image - devtruecolour.gif


    Ever got frustrated with only being able to use 16 colours in the developer studio IDE? DevTrueColour is an add-in 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

    The add-in uses Chris Maunder's Office 97 style Colour Picker control.


    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 add-in enabled!

    I have only been able to test the add-in 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 add-in registers a thread wide window procedure 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 picker's selected colour, WM_ENABLE, which enables and disables the colour picker windows based on the enabled state of the hidden colour combo boxes, and WM_DESTROY, which is used for cleaning up when the property sheet is closed.

  • License

    This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


    About the Author

    Simon Capewell
    Software Developer (Senior)
    United Kingdom United Kingdom
    No Biography provided

    Comments and Discussions

    GeneralOffice 2000 or 2003 colors PinmemberAdrian Bacaianu16-Nov-03 6:35 
    GeneralCrashes DevStudio when active and loses focus PinmemberJeff Elliott14-Nov-03 7:25 
    Great addin; I've been using it for years. I just got my boss up and running with it too, and the first thing he did was to try to set up DevStudio's colors like his favorite other editor. When he uses Alt-Tab to change the focus from this addin's window to the other editor's window (or for any reason this addin's window loses focus), DevStudio crashes with the dreaded 0xC0000005. I can duplicate the situation on my machine too. Both of us are running XP Pro with various combinations of other addins such as Doxygen/DoxBar, VisualAssist, WndTabs, and custom macros, but this still happens with everything else uninstalled or disabled.
    I'm going to download the source and see if I can find where this crash is coming from, but has anyone already found the solution?
    GeneralPrinting and copying in colour Pinsussgazefac7-Oct-03 15:45 
    GeneralWM_CHANGEBORDER Pinmemberthe_sikander25-Jun-03 5:51 
    GeneralDoesn't work in VC 6 SP5 Prof Edit PinmemberFranzKlein21-May-03 0:34 
    GeneralRe: Doesn't work in VC 6 SP5 Prof Edit PinmemberSimon Capewell5-Aug-03 0:53 
    GeneralRe: Doesn't work in VC 6 SP5 Prof Edit PinmemberVogelH9-Mar-05 11:02 
    GeneralGreat Addin Pinmemberolaymic11-Apr-03 2:39 
    QuestionWhat about.... Pinmemberalan939-Apr-03 3:19 
    AnswerRe: What about.... PinmemberSimon Capewell6-May-03 0:36 
    GeneralRe: What about.... Pinmemberalan936-May-03 3:27 
    GeneralGreat utility Pinmembermama_pendse6-Mar-03 22:41 
    GeneralPheww! PinmemberNitron8-Jan-03 16:06 
    GeneralStill can't use resource editor for >256 color bitmaps. PinmemberMike Resar11-Jun-02 8:06 
    GeneralRe: Still can't use resource editor for >256 color bitmaps. PinmemberSimon Capewell23-Aug-02 5:27 
    Generalwinnt error PinmemberAnonymous14-May-02 0:31 
    GeneralRe: winnt error PinmemberSimon Capewell1-Jul-02 1:20 
    GeneralBug report... PinmemberAnonymous24-Dec-01 1:53 
    GeneralRe: Bug report... PinmemberJeff Elliott14-Nov-03 7:28 
    GeneralI have problems with the addin PinmemberBLooD22-Jun-01 5:54 
    GeneralRe: I have problems with the addin PinmemberSimon Capewell13-Jul-01 7:55 
    GeneralRe: I have problems with the addin PinmemberAnonymous4-Sep-01 19:26 
    GeneralRock 'n Roll! PinsussBret Pehrson10-Jun-00 20:59 
    GeneralExcellent! PinsussAbu20-May-00 12:29 
    GeneralGreat add-in! Any idea where.. PinsussJames White29-Mar-00 6:32 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    | Advertise | Privacy | Terms of Use | Mobile
    Web03 | 2.8.150326.1 | Last Updated 27 Jan 2000
    Article Copyright 2000 by Simon Capewell
    Everything else Copyright © CodeProject, 1999-2015
    Layout: fixed | fluid