Click here to Skip to main content
13,290,735 members (75,500 online)
Click here to Skip to main content
Add your own
alternative version


11 bookmarked
Posted 9 Aug 2001

Enum Viewer Dialog

, 4 Oct 2001
Rate this:
Please Sign up or sign in to vote.
This article demonstrates a tool for displaying enum values

Sample Image


The enum viewer utility is used to read C/C++ include files and pull out the enums and their values. Enter an include file name into the Enum File edit control and press OK. This will a load list of enums found in the file into the Enums combo box. Select an enum from the combo box and its members and the values assigned to the enum member will be listed in the list control. There are two columns. The first column is used to display what the assigned enum value would be. The second column displays the enum text. The utility is useful when working with large enums and you are debugging an application and you are trying to determine what the enum is from a numeric value.

It currently handles enums of the following form:

enum TestEnum

enum TestEnum2 { TENUM1, TENUM2, TENUM3=200, TENUM4, };

enum TestEnum3 { TNUM1, TNUM2, TNUM3=200, TNUM4, };

enum {A = 1, B =2};
enum {C,D};

void f()
   enum {e, f, g = 20};

enum {H, I ,J};

It demonstrates the use of a recent file list in a MFC dialog based application.


5 Oct 2001 - updated source


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


About the Author

Software Developer
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

GeneralBUGS Pin
Rejeesh.T.S14-Aug-01 19:40
memberRejeesh.T.S14-Aug-01 19:40 
GeneralRe: BUGS Pin
Anonymous21-Aug-01 19:39
memberAnonymous21-Aug-01 19:39 
Question??? Pin
Rejeesh.T.S13-Aug-01 18:55
memberRejeesh.T.S13-Aug-01 18:55 
Question??? Pin
Rejeesh.T.S13-Aug-01 2:16
memberRejeesh.T.S13-Aug-01 2:16 
AnswerRe: ??? Pin
Cathy13-Aug-01 10:50
memberCathy13-Aug-01 10:50 
GeneralRe: ??? Pin
Larry Dobson8-Oct-01 13:50
memberLarry Dobson8-Oct-01 13:50 
There is a very useful feature that not many know about.
At least in visual studio...
If when you declare your enums, you typedef them, then the name of the enum will show up in the debugger (rather than the value).

typedef enum {one=1,two,three,four} myEnum;

myEnum x = three;

Larry Dobson

If you want to be seen, stand up.
If you want to be heard, speak up.
If you want to be respected, shut up.
William Batson

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.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.171207.1 | Last Updated 5 Oct 2001
Article Copyright 2001 by PPresedo
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid