Top tip for MSVC++ users

Started by
8 comments, last by BSXrider 22 years, 2 months ago
Is it possible to make user-defined types be "higlighted" in the edit window, like how int, float etc are blue by default. I doubt this can be done automatically but if there's a way to manually add them that'd be good enough. Specifically I want to make GLfloat, GLuint etc blue. - seb Edited by - bsxrider on February 2, 2002 10:17:20 AM
Advertisement
Ah ha! Found it. You need to creat a file called usertype.dat and put it in the same directory as msdev.exe.

quote:To set syntax coloring for user-defined keywords

In the same directory as msdev.exe, use the Text editor or Windows Notepad to create a text-only file named usertype.dat.


Add your keywords to usertype.dat, one keyword per line.
Note The usertype.dat file is read during initialization. It cannot be renamed, nor can it be reloaded during an editing session. The syntax coloring mechanism checks the usertype.dat file last. Thus, all previously defined color settings take precedence over the user-defined keywords.

Save the file as a text-only file, exit, and then restart Visual Studio.


From the Tools menu, choose Options.


Select the Format tab.


In the Colors box, select User Defined Keywords.


Set the font, font size, foreground color, and background color to your preferences.
For more information, see To change colors used in syntax coloring.

Click OK.


- seb
I''d be interested to know if this is possible on a per-project basis. Probably not. Grr.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost ]
There is a third party tool which will do this, and more automatically. it is very good, but has a steep cost. you can try out a 30 day trial by visiting their website if you are interested.
Cheers Frigid.

I thought the same Kylotan. You COULD do that by creating a batch file for each project which would copy a file to usertypes.dat and then launch msvc++ with the appropriate project. I''m about to implement this.

- seb
Yep Visual Assist that Frigid pointed out IS the way to go. $79 ain''t TOO much.

- seb
Noo!!! Dont pay fo'' it. Download the demo vertion and use http://www.astalavista.com for a geygen. Thats what I did, and now coding is sooo much easyer!!

quote:Original post by hlusnagen
Noo!!! Dont pay fo'' it. Download the demo vertion and use http://www.astalavista.com for a geygen. Thats what I did, and now coding is sooo much easyer!!

It''s also illegal, and we frown on things like that here. If someone has published a work and specified that it is to be paid for, either pay them or don''t use it. You don''t have a right to their creation.

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!
Good for you!
Some of us, though, would prefer to acquire our software legally.
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
I was gonna mention the possibility of a crack in my post (though I would pay for it personally) but I knew I''d get flamed like you did.

Ha Ha !

- seb

This topic is closed to new replies.

Advertisement