Click here to Skip to main content
15,881,588 members
Articles / Desktop Programming / MFC
Article

Syntax coloring for user-defined keywords in Visual Studio

Rate me:
Please Sign up or sign in to vote.
4.70/5 (12 votes)
20 Mar 2000 106.3K   1.1K   33   12
A UserType.dat file that provides syntax coloring for user-defined keywords in Visual Studio
  • Download source files - 180 Kb
  • Visual Studio allows you to specify your own keywords for syntax coloring. You simply need to provide a file called UserType.dat. This file should contain each keyword you want highlighted, with each keyword on a separate line.

    Place the file in the same directory as msdev.exe, and then in Visual Studio go to Tools | Options and select the Format tab.

    Visual Studio Options Dialog

    Select "User Defined Keywords" and set the foreground and background colors to whatever you want. Once this is done, all words in your UserType.dat file will be highlighted in your edit windows.

    The UserType.dat file provided here contains contains all the main symbols used by MFC, including Windows functions, constants, messages IDs, styles, MFC classes, member functions.

    License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here


    Written By
    United States United States
    This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

    Comments and Discussions

     
    GeneralCool Tip! Pin
    Jeremy Falcon18-Jun-03 5:15
    professionalJeremy Falcon18-Jun-03 5:15 
    GeneralReally cool, but... Pin
    mili21-Oct-02 5:19
    mili21-Oct-02 5:19 
    GeneralSyntax coloring Pin
    Anonymous28-Sep-02 23:55
    Anonymous28-Sep-02 23:55 
    GeneralRe: Syntax coloring Pin
    Benjamin Mayrargue3-Feb-03 5:59
    Benjamin Mayrargue3-Feb-03 5:59 
    GeneralRe: Syntax coloring Pin
    Anonymous28-Dec-03 8:08
    Anonymous28-Dec-03 8:08 
    GeneralRe: Syntax coloring Pin
    Steven A Bristol6-Jan-05 1:24
    Steven A Bristol6-Jan-05 1:24 
    GeneralHI Pin
    | mProject |12-Nov-01 17:14
    | mProject |12-Nov-01 17:14 
    QuestionCan we use multiple colours ? Pin
    shahzad29-Jun-00 11:37
    shahzad29-Jun-00 11:37 
    GeneralNice Pin
    John Schroedl22-Mar-00 14:48
    professionalJohn Schroedl22-Mar-00 14:48 
    GeneralBroken link to file Pin
    Ray Hayes21-Mar-00 22:44
    Ray Hayes21-Mar-00 22:44 
    The referenced file doesn't seem to be correctly linked
    GeneralRe: Broken link to file Pin
    Bill Leibold5-Sep-01 17:33
    Bill Leibold5-Sep-01 17:33 
    GeneralRe: Broken link to file Pin
    Ravi Bhavnani25-Oct-01 6:55
    professionalRavi Bhavnani25-Oct-01 6:55 

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

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