[译]枚举查看器对话框
By robot-v1.0
本文链接 https://www.kyfws.com/applications/enum-viewer-dialog-zh/
版权声明 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
- 2 分钟阅读 - 694 个词 阅读量 0[译]枚举查看器对话框
原文地址:https://www.codeproject.com/Articles/1296/Enum-Viewer-Dialog
原文作者:PPresedo
译文由本站 robot-v1.0 翻译
前言
This article demonstrates a tool for displaying enum values
本文演示了一种用于显示枚举值的工具
介绍(Introduction)
枚举查看器实用程序用于读取C/C ++包含文件并提取枚举及其值.在"枚举文件"编辑控件中输入一个包含文件名,然后按OK.这会将在文件中找到的枚举列表加载到"枚举"组合框中.从组合框中选择一个枚举,它的成员,分配给该枚举成员的值将在列表控件中列出.有两列.第一列用于显示分配的枚举值.第二列显示枚举文本.当使用大型枚举并且正在调试应用程序并且试图从数字值确定枚举时,该实用程序很有用.(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
{
TEST_ENUM_1=100,
TEST_ENUM_2,
TEST_ENUM_3,
TEST_ENUM_4=500,
TEST_ENUM_5,
TEST_ENUM_6,
};
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};
它演示了基于MFC对话框的应用程序中最近文件列表的使用.(It demonstrates the use of a recent file list in a MFC dialog based application.)
历史(History)
2001年10月5日-更新源(5 Oct 2001 - updated source)
许可
本文以及所有相关的源代码和文件均已获得The Code Project Open License (CPOL)的许可。
C++ VC6 Windows Win2K MFC Visual-Studio Dev 新闻 翻译