vc++中Text Control设置字体

xiaodong60606 2014-02-12 05:25:51
BOOL CDlgPhone::OnInitDialog()
{
CDialogEx::OnInitDialog();

// TODO: 在此添加额外的初始化
CDC *pdc=GetDC();
CFont m_font1;
//设置字体
LOGFONT lf;
::ZeroMemory(&lf, sizeof(lf));
lf.lfHeight = -MulDiv(30, pdc->GetDeviceCaps(LOGPIXELSX), 100);
lf.lfWidth = 100;
lf.lfEscapement = 0;
lf.lfOrientation = 0;
lf.lfWeight = FW_BOLD;
lf.lfItalic = FALSE;
lf.lfUnderline = TRUE;
lf.lfStrikeOut = FALSE;
lf.lfCharSet = DEFAULT_CHARSET;
lf.lfOutPrecision = OUT_DEFAULT_PRECIS;
lf.lfClipPrecision = CLIP_DEFAULT_PRECIS;
lf.lfQuality = DEFAULT_QUALITY;
lf.lfPitchAndFamily = VARIABLE_PITCH|FF_ROMAN;
m_font1.CreateFontIndirect (&lf);
GetDlgItem(IDC_PHONE)->SetFont(&m_font1);
GetDlgItem(IDC_PHONE)->SetWindowText(m_szPhone);
ReleaseDC(pdc);
return TRUE; // return TRUE unless you set the focus to a control
// 异常: OCX 属性页应返回 FALSE
}
没有变化,按理说lf.lfUnderline = TRUE;应该有下划线的,但是没有,怎么回事?谢谢。
...全文
627 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
wc0000 2014-10-09
  • 打赏
  • 举报
回复
lz,发一下显示电话号码130(黑色)1111(红色)1111(绿色)的代码呀
xiaodong60606 2014-02-13
  • 打赏
  • 举报
回复
引用 5 楼 dingxz105090 的回复:
[quote=引用 4 楼 xiaodong60606 的回复:] 怎么让里面的文字,每一部分的颜色都不一样,我想显示电话号码130(黑色)1111(红色)1111(绿色),谢谢。
用3个Text Control,或者用RichEditCtrl[/quote] 谢谢。
凌乱哥 2014-02-13
  • 打赏
  • 举报
回复
引用 4 楼 xiaodong60606 的回复:
怎么让里面的文字,每一部分的颜色都不一样,我想显示电话号码130(黑色)1111(红色)1111(绿色),谢谢。
用3个Text Control,或者用RichEditCtrl
xiaodong60606 2014-02-13
  • 打赏
  • 举报
回复
引用 2 楼 dingxz105090 的回复:

CFont *f=new CFont;
f->CreateFont(25,12,0,0,FW_BOLD,FALSE,FALSE,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH|FF_SWISS,_T("宋体"));
((CStatic *)GetDlgItem(IDC_STATIC_TIP))->SetFont(f,TRUE);
怎么让里面的文字,每一部分的颜色都不一样,我想显示电话号码130(黑色)1111(红色)1111(绿色),谢谢。
我系麦叔叔 2014-02-13
  • 打赏
  • 举报
回复
引用 2 楼 dingxz105090 的回复:

CFont *f=new CFont;
f->CreateFont(25,12,0,0,FW_BOLD,FALSE,FALSE,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH|FF_SWISS,_T("宋体"));
((CStatic *)GetDlgItem(IDC_STATIC_TIP))->SetFont(f,TRUE);
//屌炸天!
凌乱哥 2014-02-13
  • 打赏
  • 举报
回复

CFont *f=new CFont;
f->CreateFont(25,12,0,0,FW_BOLD,FALSE,FALSE,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH|FF_SWISS,_T("宋体"));
((CStatic *)GetDlgItem(IDC_STATIC_TIP))->SetFont(f,TRUE);
xiaodong60606 2014-02-13
  • 打赏
  • 举报
回复
已经弄好了,谢谢。
见习学术士 2014-02-12
  • 打赏
  • 举报
回复
在 CDlgPhone 的 OnPaint 里面设置字体
第一部分 程序员必读 第一章 对程序错误的处理 在我们开始介绍Microsoft Windows应该提供的许多特性之前,我们首先必须了解Windows的各个函数是如何进行错误处理的。 当你调用一个Windows函数时,它首先要检验你传递给它的的各个参数的有效性,然后再设法执行它的任务。如果你传递了一个无效参数,或者由于某种原因它无法执行这项操作,那么该函数就会返回一个值,指明该函数在某种程度上运行失败了。表1-1列出了大多数Windows函数使用的数据类型的返回值。 表1-1 Windows函数常用的返回值类型 数据类型 表示失败的值 VOID 该函数的运行不可能失败。Windows函数的返回值类型很少 是VOID。 BOLL 如果函数运行失败,那么返回值是0,否则返回的是非0值。最 好对返回值进行测试,以确定它是0还是非0。如果它是TRUE ,则不要测试返回值。 HANDLE 如果函数运行失败,则返回值通常是NULL,否则返回值为 HANDLE,,用于标识你可以操作的一个对象。对于这个返回 值,你应该小心处理,因为有些函数会返回一个句柄 值INVALID_HANDLE_VALUE,它被定义为-1。该函数的 Platform SDK资料将会清楚地说明该函数是返回NULL还 是INVALID_HANDLE_VALID,以便指明函数运行已经失败。 PVOID 如果函数运行失败,则返回值是NULL,否则返回PVOID,以 标识数据块的内存地址。 LONG/DWORD 这是个难以处理的值。返回数量的函数通常返回LONG 或DWORD。如果由于某种原因,函数无法对你想要进行计数 的对象进行计数,那么该函数通常返回0或-1(根据该函数而定) 。如果你调用的函数返回了LONG/DWORD,那么请认真阅 读Platform SDK资料,以确保你能正确检查潜在的错误。 当一个Windows函数返回一个错误代码时,它常常可以用来了解函数为什么会运行失败。Microsoft公司编译了一个所有可能的错误代码的列表,并且为每个错误代码分配了一个32位的号码。 从系统内部来讲,当一个Windows函数检测到一个错误时,它会使用一个称为线程本地存储器的机制,将相应的错误代码号码与调用的线程关联起来。(“线程本地存储器”将在第21章介绍)。这将使线程能够互相独立地运行,而不会影响各自的错误代码。当函数返回给你时,它的返回值就能指明一个错误已经发生。若要确定这是个什么错误,请调用GetLastError函数: 见原书P4的程序(1) 该函数只返回线程的32位错误代码。 当你拥有32位错误代码的号码时,你必须将该号码转换成更有用的某种对象。WinError.h头文件包含了Microsoft公司定义的错误代码的列表。下面我显示了该列表的某些内容,使你能够看到它的大概样子: 见原书P4的程序(2)和P5的程序 你可以看到,每个错误都有3种表示法:即一个消息ID(这是你可以在源代码使用的一个宏,以便与GetLastError的返回值进行比较),消息文本(对错误的英文描述)和一个号码(你应该避免使用这个号码,而应该使用消息ID)。请记住,我只选择了WinError.h头文件的很少一部分内容来向你进行展示,整个文件的长度超过21000行。 当Windows函数运行失败时,你应该立即调用GetLastError函数,否则,如果你调用另一个Windows函数,它的值很可能被改写。 说明 GetLastError能返回线程产生的最后一个错误。如果该线程调用的Windows 函数运行成功,那么最后一个错误代码就不被改写,并且不指明运行成功。有少 数Windows函数并不遵循这一规则,并且它会更改最后的错误代码,但是Platform SDK资料通常指明,当函数运行成功时,该函数会更改最后的错误代码。 Windows 98 许多Windows 98的函数实际上是用Microsoft公司的16位Windows 3.1产 品产生的16位代码来实现的。这种比较老的代码并不通过GetLastError之类函 数来报告错误,而且Microsoft公司并没有在Windows 98修改16位代码,以 支持这种错误处理方式。对于我们来说,这意味着Windows 98的许多Win32 函数在运行失败时不能设置最后的错误代码。该函数将返回一个值,指明运行失 败,这样你就能够发现该函数确实已经运行失败。但是你无法确定运行失败的原 因。 有些Windows函数之所以能够成功运行,那是若干个原因产生的结果。例如,创建指明的事件内核对象之所以能够取得成功,原因是你实际上创建了该对象,或者是因为已经存在带有相同名字的事件内核对象。你的应用程序必须知道成功的原因。为了将该信息返回给你,Microsoft公司选择使用最后错误代码机制。这样,当某些函数运行成功时,你就能够通过调用GetLadtError函数来确定其他的一些信息。对于具有这种行为特性的函数来说,Platform SDK资料清楚地说明了GetLastError函数可以这样来使用。请参见该资料,以便找出CreateEvent函数的例子。 当你进行调试的时候,我发现监控线程的最后错误代码是非常有用的。在Microsoft Visual studio 6.0,Microsoft的调试程序支持一个非常有用的特性,即你可以配置Watch窗口,以便始终都能向你显示线程的最后错误代码的号码和该错误的英文描述。通过选定Watch窗口的一行,并键入“@err,hr",你就能够做到这一点。观察图1-1,你会看到我已经调用了CreateFile函数。该函数返回INVALID_HANDLE_VALUE(-1)的HANDLE,表示它未能打开指定的文件。但是Watch窗口向我们显示最后错误代码(即如果我调用GetLastErro函数,该函数返回的错误代码)是0x00000002。该Watch窗口又进一步指明错误代码2是指“系统不能找到指定的文件。”你会发现它与WinError.h头文件的错误代码2所指的字符串是相同的。 图1-1 在Visual Studio 6.0的Watch窗口键入 “@err,hr",你就可以查看当前线程的最后错误代码。 Visual studio还配有一个小的实用程序,称为Error Lookup。你可以使用Error Lookup将错误代码的号码转换成它的文本描述。 见P7的Error Lookup插图 如果我在我编写的应用程序发现一个错误,我可能想要向用户显示该错误的文本描述。Windows提供了一个函数,可以将错误代码转换成它的文本描述。该函数称为FormatMessage。请看下面的代码: 见原书P8的程序(1) FormatMessage函数的功能实际上是非常丰富的,在创建向用户显示的字符串信息时,它是人们首选的函数。该函数之所以有这样大的作用,原因之一是它很容易用多种语言来进行操作。该函数能够检测出用户首选的语言(在Regional Settings Control Panel小应用程序设定),并返回相应的文本。当然,你首先必须自己转换字符串,然后将已转换的消息表资源嵌入你的.exe文件或DLL模块,不过,这时该函数会选定正确的嵌入对象。ErrorShow示例应用程序(本章后面将加以介绍)展示了如何调用该函数,以便将Microsoft公司定义的错误代码转换成它的文本描述。 有些人常常问我,Microsoft公司是否建立了一个主控列表,以显示每个Windows函数可能返回的所有错误代码。可惜,答案是没有这样的列表,而且Microsoft公司将永远不会建立这样的一个列表。因为在创建系统的新版本时,建立和维护该列表实在太困难了。 建立这样一个列表时存在的问题是,你可以调用一个Windows函数,但是该函数能够在内部调用另一个函数,而这另一个函数又可以调用另一个函数,如此类推。由于各种不同的原因,这些函数的任何一个函数都可能运行失败。有时,当一个函数运行失败时,较高级的函数对它进行恢复,并且仍然可以执行你想执行的操作。为了创建该主控列表,Microsoft公司必须跟踪每个函数的运行路径,并建立所有可能的错误代码的列表。这项工作很困难。当创建系统的新版本时,这些函数的运行路径就会改变。 1.1 你也能够定义自己的错误代码 好了,我已经说明Windows函数是如何向函数的调用者指明发生的错误。Microsoft公司也使你能够将该机制用于你自己的函数。比如说,你编写了一个你希望其他人调用的函数。你的函数可能因为这样或那样的原因而运行失败,你必须向函数的调用者说明它已经运行失败。 若要指明函数运行失败,你只需要设定线程的最后的错误代码,然后让你的函数返回FALSE,INVALID_HANDLE_VALUE,NULL,或者返回任何合适的信息。若要设定线程的最后错误代码,你只需要调用下面的代码: 见原书P8的程序(2) 请将你认为合适的任何32位号码传递给该函数。我设法使用WinError.h已经存在的代码,只要该代码能够正确地指明我想要报告的错误即可。如果你认为WinError.h的任何代码都不能正确地反映该错误的性质,那么你可以创建你自己的代码。错误代码是个32位的数字,它可以划分成下表所示的各个域。 位 31-30 29 28 27-16 15-0 内容 严重性 Microsoft/ 保留 设备代码 异常代码 客户 含义 0=成功 0=Microsoft 必须是0 由Microsoft 由Microsoft/ 1=供参考 公司定义的 公司定义 客户定义 2=警告 代码 3=错误 1=客户定义 的代码 这些域将在第24章详细讲述。现在,你需要知道的重要域是第29位的信息。Microsoft公司规定,他们建立的所有错误代码的这个信息位均使用0。如果你创建自己的错误代码,你必须在这个信息位输入1。这样,就可以确保你的错误代码与Microsoft公司目前或者将来定义的错误代码不会发生冲突, 1.2 ErrorShow示例应用程序 ErrorShow应用程序“01 ErrorShow.exe"(在图1-2列出)展示了如何获取错误代码的文本描述的方法。该应用程序的源代码和资源文件位于本书所附光盘上的01-ErrorShow目录下。一般来说,该应用程序用于显示调试程序的Watch窗口和Error Lookup程序是如何运行的。当你启动该程序时,就会出现下面这个窗口。 见原书P9的插图 你可以将任何错误代码键入该编辑控件。当你单击Look Up按钮时,在底部的滚动窗口就会显示该错误的文本描述。该应用程序唯一令人感兴趣的特性是如何调用FormatMessage函数。下面是我使用该函数的方法: 见原书P10的程序(1) 第一个代码行用于从编辑控件检索错误代码的号码。然后,建立一个内存块的句柄并将它初始化为NULL。FormatMessage函数在内部对内存块进行分配,并将它的句柄返回给我们。 当调用FormatMessage函数时,我传递了FORMAT_MESSAGE_FROM_SYSTEM标志。该标志告诉FormatMessage函数,我们想要系统定义的错误代码的字符串。我还传递了FORMAT_MESSAGE_ALLOCATE_BUFFER标志,告诉该函数为错误代码的文本描述分配足够大的内存块。该内存块的句柄将在hlocal变量返回。第三个参数指明我们想要查找的错误代码的号码,第四个参数指明我们想要文本描述使用什么语言。 如果FormatMessage函数运行成功,那么错误代码的文本描述就位于内存块,我将它拷贝到对话框底部的滚动窗口。如果FormatMesage函数运行失败,我设法查看NetMsg.dll模块的消息代码,以了解该错误是否与网络有关。使用NetMsg.dll模块的句柄,我再次调用FormatMessage函数。你会看到,每个DLL(或.exe)都有它自己的一组错误代码,你可以使用Message Compiler(MC.exe)将这组错误代码添加给该模块,并将一个资源添加给该模块。这就是Visual Studio的Error Lookup工具允许你用Modules对话框进行的操作。 图1-2 ErrorShow示例应用程序 见原书P11—16 第2章 UNICODE 随着Microsoft公司的Windows操作系统在全世界日益广泛的流行,对于我们这些软件开发人员来说,将我们的目标瞄准国际上的各个不同市场,已经成为一个越来越重要的问题。美国的软件版本比国际版本提前6个月推向市场,这曾经是个司空见惯的现象。但是,由于各国对Windows操作系统提供了越来越多的支持,因此就更加容易为国际市场生产各种应用软件,从而缩短了软件的美国版本与国际版本推出的时间间隔。 Windows操作系统始终不逾地提供各种支持,以帮助软件开发人员进行应用程序的本地化工作。应用软件可以从各种不同的函数获得特定国家的信息,并可观察控制面板的设置,以确定用户的首选项。Windows甚至支持不同的字体,以适应我们的应用的需要。 我之所以将这一章放在本书的开头,是因为我考虑到Unicode是开发任何应用程序时要采用的基本步骤。关于Unicode的问题,我在本书的每一章几乎都要讲到,而且本书给出的所有示例应用程序都是“用Unicode实现的”。如果你为Microsoft Windows 2000或Microsoft Windows CE开发应用程序,你应该使用Unicode进行开发。如果你为Microsoft Windows 98开发应用程序,你必须对某些问题作出决定。本章也要讲述Windows 98的有关问题。 2.1 字符集 软件的本地化要解决的真正问题,实际上就是如何来处理不同的字符集。多年来,我们许多人一直将文本串作为一系列单字节字符来进行编码,并在结尾处放上一个零。对于我们来说,这已经成了习惯。当我们调用strlen函数时,它在以0结尾的单字节字符数组返回字符的数目。 问题是,有些文字和书写规则(比如日文的汉字就是个典型的例子)的字符集的符号太多了,因此单字节(它提供的符号最多不能超过256个)是根本不敷使用的。为此我们创建了双字节字符集(DBCS),以支持这些文字和书写规则。 2.1.1 单字节与双字节字符集 在双字节字符集,字符串的每个字符可以包含一个字节,也可以包含两个字节。例如,日文的汉字,如果第一个字符在0x81与0x9F之间,或者在0xE0与0xFC之间,那么你就必须观察下一个字节,才能确定字符串的这个完整的字符。如果要使用双字节字符集,对于程序员来说简直是个很大的难题,因为有些字符只有一个字节宽,而有些字符则是两个字节宽。 如果只是调用strlen函数,那么你无法真正了解字符串究竟有多少字符,它只能告诉你到达结尾的0之前有多少个字节。ANSI的C运行期库没有配备相应的函数,使你能够对双字节字符集进行操作。但是,Microsoft Visual C++的运行期库却包含许多函数,如_mbslen,它可以用来操作多字节(既包括单字节也包括双字节)字符串。 为了帮助你对DBCS字符串进行操作,Windows提供了下面的一组帮助函数。 函数 描述 PTSTR CharNext 返回字符串的下一个字符的地址 (PCTSTR pszCurrentChar); PTSTR CharPrev 返回字符串的上一个字符的地址 (PCTSTR pszStart, PCTSTR pszCurrentChar); BOOL IsDBCSLendByte 如果该字节是DBCS字符的第一个字节,则返 (BYTE bTestChar); 回TRUE 2.1.2 Unicode:宽字节字符集 Unicode是Apple和Xerox公司于1988年建立的一个技术标准。1991年,成立了一个集团机构负责Unicode的开发和推广应用。该集团由Apple、Compaq、HP、IBM、Microsoft、Oracle、Silicon Graphics、Sybase、Unisys和Xerox等公司组成。(若要了解该集团的全部成员,请通过网址www.Unicode.org查找。)该集团公司负责维护Unicode标准。Unicode的完整描述可以参阅AddisonWesley出版的《Unicode Standard》一书。(该书可以通过网址www.Unicode.org订购。) Unicode提供了一种简单而又一致的表示字符串的方法。Unicode字符串的所有字符都是16位的字符(两个字节)。它没有专门的字节来指明下一个字节是属于同一个字符的组成部分,还是一个新字符。这意味着你只需要对指针进行递增或递减,就可以遍历字符串的各个字符。你不再需要调用CharNext,CharPrev和IsDBCSLeadByte之类的函数。 由于Unicode用一个16位的值来表示每个字符,因此总共可以得到65000个字符,这样,它就能够对世界各国的书面文字的所有字符进行编码。这远远超过了单字节字符集的256个字符的数目。 目前,已经为阿拉伯文、文拼音、西里尔字母(俄文)、希腊文、西伯莱文、日文、韩文和拉丁文(英文)字母定义了Unicode代码点1。这些字符集还包含了大量的标点符号、数学符号、技术符号、箭头、装饰标志、区分标志和其他许多字符。如果你将所有这些字母和符号加在一起,总计约达35000个不同的代码点,这样,总计的65000个代码点,大约还有一半可供将来扩充时使用。 这65536个字符可以分成不同的区域。下面这个表显示了一部分这样的区域以及分配给这些区域的字符。 16位代码 字符 16位代码 字符 0000-007F ASCII 0300-036F 通用区分标志 0080-00FF 拉丁文1字符 0400-04FF 西里尔字母 0100-017F 欧洲拉丁文 0530-058F 亚美尼亚文 0180-01FF 扩充拉丁文 0590-05FF 西伯莱文 0250-02AF 标准拼音 0600-06FF 阿拉伯文 02B0-02FF 修改型字母 0900-097F 梵文 注1. 代码点是指字符集的一个符号的位置 目前尚未分配的代码点大约还有29000个,不过它们是保留供将来使用的。另外,大约有6000个代码点是保留供你个人使用的。 2. 2 为何应该使用Unicode 当你开发应用程序时,你当然应该考虑利用Unicode的优点。即使现在你不打算对你的应用程序进行本地化,开发时将Unicode放在心上,肯定可以简化将来的代码转换工作。此外,Unicode还具备下列功能: * 可以很容易地在不同语言之间进行数据交换 * 使你能够分配支持所有语言的单个二进制.exe文件或DLL文件 * 提高你的应用程序的运行效率(本章后面还要详细介绍) 2.3 Windows 2000与Unicode Windows 2000是使用Unicode从头进行开发的,用于创建窗口、显示文本、进行字符串操作等的所有核心函数都需要Unicode字符串。如果你调用任何一个Windows函数并给它传递一个ANSI字符串,那么系统首先要将字符串转换成Unicode,然后将Unicode字符串传递给操作系统。如果你希望函数返回ANSI字符串,系统就会首先将Unicode字符串转换成ANSI字符串,然后将结果返回给你的应用程序。所有这些转换操作都是在你看不见的情况下发生的。当然,进行这些字符串的转换需要占用系统的时间和内存开销。 例如,如果你调用CreateWindowEx函数,并传递类名字和窗口标题文本的非Unicode字符串,那么CreateWindowEx必须分配内存块(在你的进程的默认堆),将非Unicode字符串转换成Unicode字符串,并将结果存储在分配到的内存块,然后调用Unicode版本的CreateWindowEx函数。 对于用字符串填入缓存的函数来说,系统必须首先将Unicode字符串转换成非Unicode字符串,然后你的应用程序才能处理该字符串。由于系统必须执行所有这些转换操作,因此你的应用程序需要更多的内存,并且运行的速度比较慢。通过从头开始用Unicode来开发应用程序,你就能够使你的应用程序更加有效地运行。 2. 4 Windows 98与Unicode Windows 98不是一种全新的操作系统。它继承了16位Windows操作系统的特性,它不是用来处理Unicode。如果要增加对Unicode的支持,其工作量非常大,因此在该产品的特性列表没有包括这个支持项目。由于这个原因,Windows 98象它的前任产品一样,几乎都是使用ANSI字符串来进行所有的内部操作的。 你仍然可以编写用于处理Unicode字符和字符串的Windows应用程序,不过,使用Windows函数要难得多。例如,如果你想要调用CreateWindowEx函数并将ANSI字符串传递给它,这个调用的速度非常快,不需要从你进程的默认堆栈分配缓存,也不需要进行字符串转换。但是,如果你想要调用CreateWindowEx函数并将Unicode字符串传递给它,你就必须明确分配缓存,并调用函数,以便执行从Unicode到ANSI字符串的转换操作。然后你可以调用CreateWindowEx,传递ANSI字符串。当CreateWindowEx函数返回时,你就能释放临时缓存。这比使用Windows 2000上的Unicode要麻烦得多。在本章的后面部分,我要介绍如何在Windows 98下进行这些转换。 虽然Unicode函数的大多数代码在Windows 98不起任何作用,但是有少数Unicode函数确实拥有非常有用的实现代码。这些函数是: 见原书的P21 可惜的是,这些函数有许多函数在Windows 98会出现各种各样的错误。有些函数无法使用某些字体,有些函数会破坏内存堆栈,有些函数会使打印机驱动程序崩溃,如此等等。如果你要使用这些函数,你必须对它们进行大量的测试。即使这样,你可能仍然无法解决问题。因此你必须向用户说明这些情况。 2. 5 Windows CE与Unicode Windows CE操作系统是为小型设备开发的,这些设备的内存很小,并且不带磁盘存储器。你可能认为,由于Microsoft公司的主要目标是建立一种尽可能小的操作系统,因此它会使用ANSI作为自己的字符集。但是Microsoft公司并不是鼠目寸光。他们懂得,采用Windows CE的设备要在世界各地销售,他们希望降低软件开发成本,这样就能更加容易地开发应用程序。为此,Windows CE本身就是使用Unicode的一种操作系统。 但是,为了使Windows CE尽量做得小一些,Microsoft公司决定完全不支持ANSI Windows函数。因此,如果你要为Windows CE开发应用程序,你必须懂得Unicode,并且在整个应用程序使用Unicode。 2. 6 需要注意的问题 下面让我们进一步明确一下“Microsoft公司对Unicode支持的情况”: * Windows 2000既支持Unicode,也支持ANSI,因此你可以为它们当的任何一种开发应用程序 * Windows 98 只支持ANSI,你只能为ANSI开发应用程序 * Windows CE只支持Unicode,你只能为Unicode开发应用程序 虽然Microsoft公司试图让软件开发人员能够非常容易地开发在这3种平台上运行是软件,但是Unicode与ANSI之间的差异使得事情变得困难起来,并且这种差异通常是我遇到的最大的问题之一。请不要误解,Microsoft公司坚定地支持Unicode,并且我也坚决鼓励你使用它。不过你应该懂得,你可能遇到一些问题,需要一定的时间来解决这些问题。我建议你尽可能使用Unicode。如果你运行Windows 98,那么只有在必要时才要转换到ANSI。 不过,还有另一个小问题你应该了解,那就是COM。 2.7 对COM的简单说明 当Microsoft公司将COM从16位Windows转换成Win32时,公司作出了一个决定,即,需要字符串的所有COM接口方法都只能接受Unicode字符串。这是个了不起的决定,因为COM通常用于使不同的组件能够互相之间进行通信,而Unicode则是传递字符串的最佳手段。 如果你为Windows 2000或Windows CE开发应用程序,并且也使用COM,那么你将会如虎添翼。在你的整个源代码使用Unicode,将使与操作系统进行通信和与COM对象进行通信的操作变成一件轻而易举的事情。 如果你为Windows 98开发应用程序,并且也使用COM,那么你将会遇到一些问题。COM要求你使用Unicode字符串。操作系统的大多数函数要求你使用ANSI字符串。那是多么难办的事情啊!我曾经从事过若干个项目的开发,在这些项目,我编写了许多代码,仅仅是为了来回进行字符串的转换。 2. 8 如何编写Unicode源代码 Microsoft公司为Unicode设计了Windows API,这样,它可以尽量减少对你的代码的影响。实际上,你可以编写单个源代码文件,以便使用或者不使用Unicode来对它进行编译。你只需要定义两个宏(UNICODE和_UNICODE),就可以修改然后重新编译该源文件。 2. 8.1 C运行期库对Unicode的支持 为了利用Unicode字符串,因此定义了一些数据类型。标准的C头文件String.h已经作了修改,以便定义一个名字为wchar_t的数据类型,它是一个Unicode字符的数据类型: 见原书P23的程序(1) 例如,如果你想要创建一个缓存,用于存放最多为99个字符的Unicode字符串和一个结尾为零的字符,你可以使用下面这个语句: 见原书P23的程序(2) 该语句创建了一个由100个16位值组成的数组。当然,标准的C运行期字符串函数,如strcpy、strchr和strcat等,只能对ANSI字符串进行操作,它们不能正确地处理Unicode字符串。因此,ANSI C也拥有一组补充函数。图2-1显示了一些标准的ANSI C字符串函数,后面是它们的等价Unicode函数。 图2-1 标准的ANSI C字符串函数和它们的等价Unicode函数 见原书P23的程序(3)和P24的程序 请注意,所有的Unicode函数均以wcs开头,wcs是宽字符串的英文缩写。若要调用Unicode函数,只需用前缀wcs来取代任何ANSI字符串函数的前缀str即可。 说明 大多数软件开发人员可能已经不记得这样一个非常重要的问题了,那就 是Microsoft公司提供的C运行期库与ANSI的标准C运行期库是一致的。 ANSI C规定,C运行期库支持Unicode字符和字符串。这意味着你始终都可 以调用C运行期函数,以便对Unicode字符和字符串进行操作,即使你是在 Windows 98上运行,也可以调用这些函数。换句话说,wcscat,wcslen和wcstok 等函数都能够在Windows 98上很好地运行,这些都是你必须关心的操作系统函数。 对于包含了对str函数或wcs函数进行显式调用的代码来说,你无法非常容易地同时为ANSI和Unicode对这些代码进行编译。在本章前面部分的内容,我说过可以创建同时为ANSI和Unicode进行编译的单个源代码文件。若要建立这种双重功能,你必须包含Tchar.h文件,而不是包含String.h文件。 Tchar.h文件的唯一作用是帮助你创建ANSI/Unicode通用源代码文件。它包含你应该用在源代码的一组宏,而不应该直接调用str函数或者wcs函数。如果你在编译源代码文件时定义了_UNICODE,这些宏就会引用wcs这组函数。如果你没有定义_UNICODE,那么这些宏将引用str这组宏。 例如,在Tchar.h有一个宏称为_tcscpy。如果在你包含该头文件时没有定义_UNICODE,那么_tcscpy就会扩展为ANSI的strcpy函数。但是如果定义了_UNICODE,_tcscpy将扩展为Unicode的wcscpy函数。拥有字符串参数的所有C运行期函数都在Tchar.h文件定义了一个通用宏。如果你使用通用宏,而不是ANSI/Unicode的特定函数名,你就能够顺利地创建可以为ANSI或Unicode进行编译的源代码。 但是,除了使用这些宏之外,还有一些操作你是必须进行的。Tchar.h文件包含了一些其他的宏。 若要定义一个ANSI/Unicode通用的字符串数组,请使用下面的TCHAR数据类型。如果定义了_UNICODE,TCHAR将声明为下面的形式: 见原书P25的程序(1) 如果没有定义_UNICODE,则TCHAR将声明为下面的形式: 见原书P25的程序(2) 使用该数据类型,你可以象下面这样分配一个字符串: 见原书P25的程序(3) 你也可以创建对字符串的指针: 见原书P25的程序(4) 不过上面这行代码存在一个问题。按照默认设置,Microsoft公司的C++编译器能够编译所有的字符串,就象它们是ANSI字符串,而不是Unicode字符串。因此,如果没有定义_UNICODE,该编译器将能正确地编译这一行代码。但是,如果定义了_UNICODE,就会产生一个错误。若要生成一个Unicode字符串而不是ANSI字符串,你必须将该代码行改写为下面的样子: 见原书P25的程序(5) 原义字符串前面的大写字母L,用于告诉编译器该字符串应该作为Unicode字符串来编译。当编译器将字符串置于程序的数据部分时,它在每个字符之间分散插入零字节。这种变更带来的问题是,现在只有当定义了_UNICODE时,程序才能成功地进行编译。我们需要另一个宏,以便有选择地在原义字符串的前面加上大写字母L。这项工作由_TEXT宏来完成,_TEXT宏也在Tchar.h文件做了定义。如果定义了_UNICODE,那么_TEXT定义为下面的形式: 见原书P25的程序(6)
1,01.zip
3D Text
显示3D文字(6KB)
2,02.zip
A button within a button
按纽的按纽(13KB)
3,03.zip
Flat Owner Drawn Buttons
浮动的自画按纽(13KB)
4,04.zip
Flat-look Buttons
浮动的工具条按纽(6KB)
5,05.zip
Showing disabled combo text in black
ComboBox的只读属性(5KB)
6,06.zip
Combobox Color Picker
选择颜色的ComboBox(6KB)
7,07.zip
Switch between drop down & drop list mode
处理drop down和drop list方式之间的转换(32KB)
8,08.zip
Drop down a popdown window instead of a dropdown list from a combobox 在ComboBox用Drop down方式代替dropdown list方式(32KB)
9,09.zip
Change listbox width of combo boxes
在ComboBox改变列表框的宽度(2KB)
10,10.zip
Owner Drawn Font Selection ComboBox
自画的字体选择ComboBox(5KB)
11,add.zip
This sample was developed on stage at the Washington Software Association's WinSIG meeting on the ninth of September, 1996 using Visual C++ 4.2. (13KB)
12,apibrow.zip
The project demonstrates the use of common control callback items in an MFC applicationthat manages a CListCtrl control in a CListView. (16KB)
13,colorlb.zip
The COLORLB sample shows how to implement an owner-draw list box. (53KB)
14,comper.zip
COMPER is an example of the ATL Composite Control. (123KB)
15,custfile.zip
This sample shows how to add a couple of extra buttons to a CFileDialog. (23KB)
16,custlist.zip
CUSTLIST shows how to use custom draw in a list view control. (23KB)
17,div.zip
This sample shows how floating-point exceptions may be captured and handled in an MFC application. (14KB)
18,doodads.zip
The project demonstrates many Windows common controls, including the extensive use of image lists. (83KB)
19,doubleedit.zip
DOULBEEDIT shows how to sublcass an edit control inside a form view and react to double-clicks on the edit control by handling the WM_LBTNDOUBLECLICK message. (18KB)
20,dumpsome.zip
DUMPSOME is a project for Visual C++ 4.x that shows how to write a CGI server extension which uses MFC and DAO. (8KB)
21,edpos.zip
EDPOS is a MDI-based MFC application that shows an edit control in its primary view. (35KB)
22,edstream.zip
this sample shows how to use the StreamIn() and StreamOut() members of the CRichEditCtrl class in MFC. (36KB)
23,findrich.zip
RICHFIND is a dialog-based MFC application for Visual C++ 6.0. (24KB)
24,floatlist.zip
The FloatList sample is an MFC-based SDI application with an edit view as its main window. (49KB)
25,fully.zip
FULLY shows how to make an MFC application make one of its views go full-screen active. (43KB)
26,holder.zip
HOLDER contains the Internet Explorer web browser control using CHtmlView in an MFC application. (67KB)
27,langload.zip
LANGLOAD shows how to use the LANGUAGE keyword in a resource file to mark language-specific resources. (2KB)
28,listfind.zip
This sample shows how to use the CList<> template. (9KB)
29,ndbrow.zip
This Visual C++ 6 project shows how to create an MDI application that hosts CHtmlView (20KB)
30,mfctalk.zip
MFCTALK was originally published with Mike's article on ISPAI programming with MFC in the May (23KB)
31,mfctlist.zip
MCTTLIST is a dialog-based application that provides the same functionality as the TLIST sample in the SDK. (28KB)
32,mruless.zip
MRULESS shows a way to strip the empty "Recent Files" item off the "File" menu when there are no entries in the MRU. (32KB)
33,mtprint.zip
MTPRINT demonstrates the use of a secondary thread to perform printing in an application that uses MFC's document/view architecture. (21KB)
34,multitop.zip
MULTITOP shows how to write an SDI application which has multiple top level windows and uses the MFC doc/view architecture.(30KB)
35,njfind16.zip
This 16-bit DOS tool traverses all directories on all drives on your machine and finds files which match the template you specify. (33KB)
36,noform.zip
This sample shows how to make an application that doesn't have the doc/view architecture but still offers a form in the client area of the application's main window. (33KB)
37,odcombo.zip
ODCOMBO.ZIP is a VC++ 6.0 dialog-based project that contians an onwer-drawn combo box. (23KB)
38,picknew.zip
It demonstrates calling CDocTemplate::OpenDocumentFile(). (49KB)
39,primecon.zip
PrimeCon is a VC++ 6.0 sample which uses MFC in a console application.(60KB)
40,q1.zip
Q1 is a VC++ 6.0 project that creates two threads. (79KB)
41,scrl.zip
This dialog-based application shows how to use the CListCtrl::Scroll() member. (14KB)
42,spinrange.zip
SpinRange is a VC++ 6.0 project that shows how to subclass a CSpinButtonControl to dramatically extend the range of the control. (24KB)
43,splits.zip
This VC++ 5.0 project shows how to manage views within a splitter window. (36KB)
44,stealth.zip
This SDI application shows how to create an application that doesn't show up in the task bar in Windows 95 or Windows NT 4.0. (29KB)
45,tenhook.zip
Because the Windows dialog manager eats all keystrokes, you'll need to install a Windows keyboard hook if you want to get keyboard input to your dialog without other controls getting in the way. (19KB)
46,treestore.zip
Tree views are capable of storing hierarchical data, which isn't intuitively serialized. (41KB)
47,writeres.zip
This console application shows how to bake resources into console applications. (566KB)
48,xctrl.zip
The XCTRL sample is an ATL "full control" ATL Control. (100KB)
49,Button_Tute.zip
How to get a button control wired-in and working(34KB)
50,BetterBmpButton_src.zip
An improvement on the CBitmapButton class.(22KB)
51,hoverbutton.zip
A simple drop-in class that provides a 'hot' look button using the _TrackMouseEvent function(17KB)
52,CLedButton_src.zip
A button that looks like a LED.(24KB)
53,EllipticalButtons.zip
A class that turns rectangular buttons into elliptic buttons.(29KB)
54,RoundButtons.zip
A class that turns rectangular buttons into round buttons.(17KB)
55,AniButton.zip
A class that show AVIs inside a button.(49KB)
56,CButtonST26.zip
A fully featured owner-draw button class - it's got the lot!(225KB)
57,coolbtn.zip
This article shows the use of a Push button with a drop down menu, similar to the one found in the Office 2000 suite.(31KB)
58,CustomButtons.zip
A class to make working with radio buttons easier, and another for custom drawing buttons(45KB)
59,CWBButton.zip
CWBButton is a resizable bitmap button like GTK+ or Window Blinds.(44KB)
60,ComboDropWidth.zip
A simple tutorial explaining how to set the width of a combo dropdown list so that all items are fully visible(18KB)
61,ComboBox_Tut_demo.zip
An entry level tutorial on using the CComboBox control(65KB)
62,ListBox_Tut_src.zip
An entry level tutorial on using the CListBox control(62KB)
63,BitmapPickerCombo.zip
A combo box that can be used to display bitmaps(26KB)
64,mccombobox.zip
A multicolumn, customizable, editable combobox(27KB)
65,disableditemscombobox_src.zip
combobox with disabled items(3KB)
66,checkcombo.zip
A combo box with check boxes(21KB)
67,ColourPickerCB.zip
A combobox derived class that provides a simple color picker(36KB)
68,ComboBoxInit_src.zip
Learn how to programmatically initialize a combo box.(3KB)
69,IconComboBox_src.zip
2 Freeware MFC icon selection combo box classes(19KB)
70,ComboCompletion_demo.zip
A combobox that autocompletes as you type(17KB)
71,IDComboDemo.zip
An extremely simple but useful CComboBox entension(12KB)
72,MRUCombo.zip
A combobox that encapsulates the functionality of CRecentFileList(29KB)
73,combobox_flatcombo.zip
A drop-in replacement combobox that gives your apps the flat Office-style look(53KB)
74,readonlycombo_src.zip
Show a disabled dropdown style combobox like a read only edit box.(2KB)
75,VBLikeCombo.zip
Creates a combo box similar to those in Visual Basic.(27KB)
76,ComboTree.zip
ComboBox with a tree control drop down(36KB)
77,multichecklistbox.zip
Extends the CCheckListBox class to have multiple check box columns(19KB)
78,disableditemslistbox_src.zip
Listbox with disabled items.(2KB)
79,ImageLB.zip
A list box for viewing images(25KB)
80,LVCustomDraw.zip
Using the custom-draw features in version 4.70 of the common controls to customise the look and feel of list controls(28KB)
81,ListCtrlDemo.zip
Everything you need to know about using the standard list control in your applications(68KB)
82,filedroplistctrl.zip
This article explains how to support file drag and drop in your CWnd-derived object(40KB)
83,DrivePickerList.zip
A control that shows drive names and icons like Explorer(23KB)
84,ListEditor.zip
This article shows you how you can navigate through a multi-column, editable list view(42KB)
85,LogControl_src.zip
Learn how to use printf-like functionality to debug your GUI applications.(46KB)
86,PropertyListCtrl.zip
An object properties list control than can change based on the objects state.(64KB)
87,supergrid.zip
A combination list control and tree control with checkbox capability(87KB)
88,Listview_callback.zip
Shows how to use text callbacks in list controls(16KB)
89,HeaderCtrlEx.zip
How to make the CListCtrl's header Multiline(29KB)
90,listPrint_demo.zip
Printing the contents of a CListCtrl or CListView with multiple pages(56KB)
91,TreeListCtrlGerolf.zip
A custom-drawn tree-list hybrid, with explanations on how the control was developed.(39KB)
92,PrtTView_demo.zip
Code to add printing capabilities to a Tree View(32KB)
93,treelist.zip
A tree control / list control hybrid(81KB)
94,FileTree_src.zip
Implements a tree control similar to the left hand side of Windows Explorer.(46KB)
95,TreeOpt_src.zip
A freeware MFC class to provide a tree options control.(32KB)
96,ShTree.zip
A very simple manager for shared folders using tree control drag & drop (42KB)
97,NetworkTreeCtrl.zip
A CWaitingTreeCtrl-derived class to display network resources(40KB)
98,ProgressHourglassFX.zip
Two animation provider classes to add animation effects to any CWaitingTreeCtrl-derived class(33KB)
99,ShellTreeCtrl.zip
A CWaitingTreeCtrl-derived class to display Shell's resources(39KB)
100,WaitingTreeCtrl_src.zip
A CTreeCtrl derived class that populates the branches of a tree only when necessary, with optional visual effects.(5KB)
101,PathPicker.zip
An article on Browsing my computer and the network using a TreeCtrl(82KB)
102,Tree2Excel.zip
This article is a light sample showing how to iterate and export a tree control content to an Excel file.(44KB)
103,lbtab.zip
A better looking tab control(89KB)
104,CXTabControl_demo.zip
An easier tab control(32KB)
105,ResizableProperties.zip
Two CPropertySheet/CPropertyPage derived classes to implement resizable property sheets or wizard dialogs with MFC(96KB)
106,saprefs.zip
A base class for a prefereneces dialog, similar to that used in Netscape(39KB)
107,wizardpropertysheet_src.zip
A simply class to turn CPropertySheet into wizard mode without needing to alert the property pages within(2KB)
108,AutoRichEditCtrl.zip
CAutoRichEditCtrl - automate rich edit formatting and RTF handling(49KB)
109,AutomaticSplitter.zip
A tutorial that shows how to automatically split a view, and also how to indicate which view has the focus(31KB)
110,usefulsplitter.zip
An extension to MFCs CSplitterWnd that provides splitter locking and dynamic view replacement(25KB)
111,rulers_src.zip
Using fixed panes to add rulers to your view(5KB)
112,StaticCtrl_Tut_demo.zip
An entry level tutorial on using the CStatic control(64KB)
113,rotated_bevel.zip
A bevelline control that displays vertical and horizontal text(83KB)
114,Ticker.zip
A class that provides a news/stock ticker for your MFC applications(47KB)
115,StaticCounter.zip
A control to display time, floating point numbers or integers using an LED digital-style display(41KB)
116,CStaticTime.zip
A control to display times and numbers using an LED digital-style display(52KB)
117,alexf_histogram.zip
A simple histogram control for displaying data(23KB)
118,static_fader.zip
A CStatic class that gently fades text into view(99KB)
119,CLabel_demo.zip
A fully stocked owner drawn CStatic class(52KB)
120,DigiString.zip
A control to display text or numbers with a 14 or 7 segment display(176KB)
121,cstatic_filespec.zip
Lightweight class for displaying long filespecs that may need to be truncated(16KB)
122,tip_static.zip
A tip-of-the-day control that uses a cool sliding effect to show each tip(133KB)
123,UsingCtrlsInDialogs_Tut_demo.zip
An entry level tutorial on using one of the Windows Common Controls in a dialog(42KB)
124,CmdUIDemo.zip
A C++/MFC sample how to implement UI notifications for user-defined controls(15KB)
125,SubclassDemo.zip
An introduction to subclassing the Windows common controls using MFC(19KB)
126,CustomControl.zip
An introduction to creating custom controls using MFC(22KB)
127,graph2d.zip
A comprehensive set of classes for displaying 2 dimensional data(386KB)
128,3dMeter_demo.zip
An Analog Meter Control for displaying real-time data(42KB)
129,analog_meter.zip
A control that displays a numerical value as an analog meter(45KB)
130,oscope.zip
A control that graphically displays numerical information(31KB)
131,swing_demo.zip
A set of MFC classes the duplicate the Java Swing look and feel(76KB)
132,ReportCtrl.zip
An Outlook 98/2000 Style SuperGrid Report Control that tries to overcome some of the weaknesses of other implementations.(179KB)
133,controls_pager.zip
This article presents a wrapper class for the pager control(28KB)
134,RulerCtrl.zip
A simple ruler control to allow users to set margins or indents(21KB)
135,CSizer.zip
A class that provides the ability to move and size controls at run-time (34KB)
136,controls_avi_demo.zip
Demonstrates the use of the windows animation control(145KB)
137,CMapPin_src.zip
A Freeware MFC class to implement Map pins.(286KB)
138,CFCtrl.zip
The simplest way to change color, font or set blinking mode for any standard control(53KB)
139,CPushPin_src.zip
A Freeware MFC PushPin button class.(15KB)
140,CWndSlider.zip
An article on using an Outlook style window slider control.(98KB)
141,cxwndAnimate_demo.zip
An animation control that uses a bitmap imagelist instead of an AVI file(25KB)
142,hyperlink.zip
A simple drop-in hyperlink control(28KB)
143,ViewObjSnap.zip
How to take a snapshot of an OCX without using HWNDs.(38KB)
144,lbspin.zip
A spin button whose arrows automatically disable themselves when they are at their maximum or minimum value.(27KB)
145,SubclassWnd_demo.zip
A plug in class that allows you to intercept and handle messages for any window class(266KB)
146,resize_at_runtime_demo.zip
A method to allow the user to visually resize and position any control at run time(15KB)
147,RoundSliderCtrl.zip
A round slider control to allow users to adjust an angle or similar values(90KB)
148,EasyFavorite.zip
An application demonstrating the windows Thumbnail control(42KB)
149,TGroupBox.zip
A very simple group box replacement to enhance your user interface(3KB)
150,WndImg.zip
An easy-to-use control to display bitmaps (stretch, scale, tile)(128KB)
151,URLCell_src.zip
A new class that adds hyperlink support to the MFC Grid Control(3KB)
152,gridctrl.zip
A fully featured MFC grid control for displaying tabular data. The grid is a custom control derived from CWnd(381KB)
153,GridTreeCtrl.zip
A set of classes derived from CGridCtrl that embed a tree control, button controls, and virtual cells within the grid(221KB)
154,gridctrl_demo220.zip
Explains how to use comboboxes to edit cells in the MFC Grid Control(203KB)
155,AddHTMLy.zip
A quick and simple example of using MSHTML to modify the DOM(36KB)
156,Process_HTMLFORM.zip
A simple method to processing HTML forms From a CHtmlView(60KB)
157,ColorButton.zip
A simple modification to Chris Maunder's "Office 97 style Colour Picker" control(44KB)
158,ColorSpace_demo.zip
A replacement color picker control allowing you full visual control over RGB and HSB selections(288KB)
159,ColorDlg.zip
A simple color chooser dialog that uses slifer controls to allow the user to combine different RGB values(37KB)
160,choicelistbutton_demo.zip
A dropdown menu button with checkbox menu items(25KB)
161,HotList.zip
A control for selecting items from a list, with tool tips and mouse tracking(33KB)
162,colour_picker.zip
A simple drop in color chooser control(54KB)
163,progresswnd.zip
A popup window containing a progress control and cancel button - no resource file needed(34KB)
164,ProgressCtrlX.zip
An enhanced progress control that supports gradient shading, formatted text, 'snake' and reverse modes, and vertical modes(80KB)
165,GradientProgressCtrl.zip
Subclasses the standard CProgressCtrl to allow for gradient fills. Supports vertical progress controls as well.(52KB)
166,piectrl.zip
A progress control with a difference(149KB)
167,text_progressctrl_demo.zip
A smooth progress control with text(15KB)
168,ProgressBar.zip
An easy way to add a progress control to a status bar(33KB)
169,ProgressTimeToComplete.zip
A progress control that tells the user how long an operation has left to complete(26KB)
170,IProgressDialog_demo.zip
A wrapper class for the progress dialog provided by IE 5.(20KB)
171,rotary.zip
A rotary knob similar to that used in the Windows 2000 CD Player(67KB)
172,SizeDemo.zip
An MS-Word like drop down window for creating tables(37KB)
173,ToolTipEx.zip
A drop-in multiline extendable tooltip control(1052KB)
174,Multiline_Titletips_demo.zip
A class that allows you to display data for a control that is otherwise not large enough to display the full text(23KB)
175,CHtmlView_Search_demo.zip
Could be used to create a Visual C++ like search combo for CHtmlViews...
Update: Now you can highlight all matching words!(36KB)
176,AssociationGrid.zip
Grid control with vertical column headers.(85KB)
1,01.zipMFC Extension LibraryMFC扩展界面库, 使用Visual C++ 6.0(15KB)2,02.zipVisual Studio style UIVisual Studio风格的界面效果(15KB)3,03.zipInternet Explorer 4 style UIIE4.0风格的界面效果(29KB)4,04.zipOutlook Style UIOutlook风格的界面效果(16KB)5,05.zipDynamic child window repositioning动态改变对话框的大小, 对话框的控件相应改变(15KB)6,06.zipEnhanced list control增强的List控件(43KB)7,07.zipCDialog using animated control在CDialog使用动画(12KB)8,08.zipOpen Dialog with Bitmap Preview位图预览的打开文件对话框(43KB)9,09.zipStandard file open dialog with preview标准位图预览的打开文件对话框(24KB)10,10.zipBitmap Dialog Class位图对话框类(13KB)11,11.zipClass for Browsing shell namespace with your own dialog显示目录的树型结构, 可用于目录的选择(31KB)12,12.zipUsing ON_UPDATE_COMMAND_UI with dialogs在对话框使用ON_UPDATE_COMMAND_UI(13KB)13,13.zipUsing ON_UPDATE_COMMAND_UI with dialogs (2)使用ON_UPDATE_COMMAND_UI(11KB)14,14.zipModeless child dialog in a Main Dialog with corrected tab order非模式对话框在主对话框的TAB顺序(21KB)15,15.zipCostumizing CFileDialog定制的CFileDialog(22KB)16,16.zipAttaching Elements to Borders一个可以在对话框改变按纽位置、大小的容器(26KB)17,17.zipScrolling credits dialog滚动信用对话框(12KB)18,18.zipColor Dialog with Persistent Custom Colors对话框继承了上一次的颜色风格(12KB)19,19.zipA Base Dialog Class for Modal/Modeless Dialog with Custom Background Color自定义背景的对话框(13KB)20,20.zipParse IP addresses解析IP地址(12KB)21,21.zipParse phone fields解析电话区域(11KB)22,22.zipChanging the default file open/save dialogs in an MFC doc/view application初始化对话框和支持动态数据交换(DDX)(15KB)23,23.zipDialog with Splash Screen Example Code...Splash对话框的例子(18KB)24,24.zipClass to select directory选择目录的类(13KB)25,25.zipClass to select directory (Enhancements)增强的选择目录的类(12KB)26,26.zipDirectory Picker Dialog目录采集对话框(42KB)27,27.zipSimple way to change dialog's background and text colors改变对话框背景颜色和文字颜色的简单途径(11KB)28,28.zipA Simple Dialog Layout Manager一个简单的对话框设计管理器(19KB)29,29.zipUsing Buttons on a Dialog Bar with CCmdUI通过CCmdUI在对话框条使用按纽(19KB)30,30.zipDisplay help for dialog controls on the status bar在状态条显示对话框控件的帮助信息(12KB)31,31.zipDragging a dialog by clicking anywhere on it点击任何地方拖动对话框(11KB)32,32.zipSplash screen with text on it that uses its own thread通过自己的线程在Splash对话框显示文字(136KB)33,33.zipCreating an expanding dialog创建一个可扩展的对话框(15KB)34,34.zipExpanding/Contracting Dialog Box扩展/缩小对话框(24KB)35,35.zipCFileDialog class that only displays folders让CFileDialog只显示目录(很有用)(2KB)36,36.zipFolder Browsing Dialog目录浏览对话框(3KB)37,37.zipFont dialog with custom text preview & color字体对话框增加字体和颜色的预览(12KB)38,38.zipEmbedding an HTML Help window into a dialog嵌入一个超文本(HTML)的帮助窗口到对话框(22KB)39,39.zipDialog which can be used as MDI child window使用MDI子窗口的对话框(13KB)40,40.zipConvert modal dialogs to modeless将模式对话框转换成非模式对话框(12KB)41,41.zipNetscape 4.x Preferences Dialog类似Netscape 4.x参数选择的对话框(7KB)42,42.zipHandling OnUpdate() processing for menu itemsOnUpdate()处理菜单项(5KB)43,43.zipOptions Tree Dialog树状的配置对话框(25KB)44,44.zipCustomizing the font dialog定制的字体对话框(4KB)45,45.zipSizable dialogs at its easiest轻松改变对话框的大小(5KB)46,46.zipA Snap Size Dialog Class一个捕获对话框大小的类(5KB)47,47.zipCSplitterWnd in a Dialog based Application一个基于对话框的应用(6KB)48,48.zipSplash Screen with 256 color support支持256色的Splash对话框(7KB)49,49.zipSubselection Dialog 子项选择的对话框(5KB)50,50.zipSwitching dialog boxes in a dialog-based application在基于对话框应用切换对话框(5KB)51,51.zipBetter Tip of the Day dialog典型的Did you konw...对话框(26KB)52,52.zipToolbars and Statusbars on Dialogs在对话框增加工具条和状态条(7KB)53,53.zipTooltips in modal dialog boxes在模式对话框实现工具提示(6KB)54,54.zipTooltips for dialog controls实现对话框控件的工具提示(4KB)55,55.zipTransparent Dialog透明的对话框(5KB)56,56.zipViewing Dialog Template Resources at Runtime运行时看对话框模板资源(5KB)57,57.zipAlternative Wizard Dialog一个Wizard对话框, 在安装程序也有用(5KB)58,58.zipAVLTree实现AVL(Addison-Velski and Landis)树结构(5KB)59,59.zipTemplate class to manipulate bits of undefined type一个操作未知类型的模板库(5KB)60,60.zipBlowfish EncryptionBlowfish加密算法加密(4KB)61,61.zipBlowfish encryption classBlowfish加密类(5KB)62,62.zipExpression Evaluation数学公式识别类(5KB)63,63.zipA Y2.038K-Safe Replacement for CTimeCTime的替换类(5KB)64,64.zipIterating through List Containers关于List容器的话题(5KB)65,65.zipLexical Analyser词汇分析(8KB)66,66.zipLocales and Facets in Visual C++VC++的许多细节话题(10KB)67,67.zipA Generalized Parsing Class for MFC一个普通的MFC解析类(5KB)68,69.zipCreating Singleton Objects using Visual C++使用VC++创建一个单独的对象(9KB)69,69.zipSmart Pointers and other Pointer classes指针类(5KB)70,70.zipSortable CObArray class对CObArray类排序(5KB)71,71.zipSortable CObList class对CObList类排序(6KB)72,72.zipExtension to the STL find_if and for_each扩充STL库(5KB)73,73.zipChange from child window to popup window (and back) 将一个子窗口改成弹出式窗口(5KB)74,74.zipRestoring Window Position With Multiple Monitors在多层监视器恢复窗口的位置(5KB)75,75.zipTransparent Window透明的窗口(6KB)76,CenterMDIWnd_demo.zipCenter CMDIChildWnds in the client area of the main frame window(151KB)77,TabbedMDI.zipA variation on the MDI that indicates the open child windows in a tab control. (400KB)78,AdvancedPrev.zipA simple class that helps provide faster Print Preview within MFC Doc/View applications(38KB)79,mditab.zipA dockable bar containing a tabbed list of open windows(91KB)80,CloseUnusedDocs_src.zipClosing unused MDI documents with 1 line of code(2KB)81,graphfx_demo.zipA Doc/View framework for displaying graphical data(192KB)82,WindowsManager.zipImplementing "Windows..." dialog(39KB)83,MultiMRUList_src.zipThis article describes how to maintain the separate MRU list for each document type that is needed in some applications(26KB)84,MultiTop.zipAllows an application to have multiple top-level windows. (22KB)85,PersistFrames.zipA collection of classes that allows MFC SDI and MDI applications to remember the positions and sizes of their main frame and child frame windows. (71KB)86,step0.zipA series of articles that resulted from experimenting with adding Drag and Drop features to my existing application. (16KB)87,undo.zipEasily add Undo/Redo to your CDocument/CView Based Applciation(2KB)88,PropertyView.zipA "Property Sheet"-like view class for MFC (108KB)89,DocViewWTL.zipA library that provides the easiest way to get loosely coupled components. (156KB)90,Dialog2.zipA step by step tutorial showing how to create your first windows program using MFC(112KB)91,MyMDIApp.zipA brief step-by-step tutorial that demonstrates creating an SDI and MDI based applications using the MFC Doc/View architecture.(54KB)92,sditutorial_demo.zipA brief step-by-step tutorial that demonstrates creating an SDI based application that does not use the MFC Doc/View architecture.(15KB)93,QuickWin.zipRedirect stdin, stdout and stderr into a window(125KB)94,GradientTitleBar.zipThis article shows you how to give your Win95/NT4 modeless dialogs a Win98/W2K like gradient title bar.(42KB)95,MsgBoxDemo.zipThe system Message Box that is closed atuomatically after some time(21KB)96,step1.zipSimple step by step article explaining how to create a modeless dialog box as child window.(21KB)97,step2.zipSimple step by step article explaining how to create a modeless dialog box as sibling of the app's main window.(22KB)98,ResizableDialog.zipA CDialog derived class to implement resizable dialogs with MFC (98KB)99,CenterAnywhere_demo.zipThis is a good replacement for CWnd::CenterWindow() that works. (43KB)100,CardDialog.zipA auto-sizing dialog used to store and display smaller child dialogs(22KB)101,scrolling_credits.zipA Scrolling Credits Dialog(209KB)102,snapdialog.zipDialog class that implement a snap-to-screen-border feature like Winamp(16KB)103,messagebox.zipA class which encapsulates MessageBoxIndirect.(18KB)104,rfldlg.zipThis article demonstrates how to add a recent file list to a dialog based application(25KB)105,dialogspl_demo.zipSplash screens are not only for Doc/View based applications(142KB)106,CClockCtrl_src.zipA Freeware MFC class to display an analog clock.(17KB)107,ChildDlg.zipChild Dialog (Sub Forms)(29KB)108,CIconDialog_src.zipA Freeware MFC dialog class to select an icon.(12KB)109,CPushPinFrame_src.zipA Freeware MFC PushPin property page dialog class.(19KB)110,showhide.zipA neat way to show/hide groups of related controls(13KB)111,ResizeCtrl.zipA resize control to implement resizable dialogs with MFC(38KB)112,DDXFile_src.zipA Freeware DDX routine for selecting a filename.(29KB)113,DynWindow_src.zipDescribes a method to implement resizable child windows.(108KB)114,DynamicDialog.zipCreate dialogs dynamically, and easily, without the need for a dialog resource script.(40KB)115,DlgExpand.zipThis article shows gives you the ability to make your dialogs expand or contract, depending on how much information the user wishes to view(15KB)116,TipDemo.zipImproved Tip-of-the-Day Dialog(149KB)117,layoutmgr.zipA framework to provide automatic layout control for dialogs and forms(101KB)118,MainWndPlacement.zipSave/restore the main window size at application exit/startup with a single function call in MDI, SDI and dialog based applications.(29KB)119,sizer_demo.zipAn article on extendable layout management classes(27KB)120,Splasher_src.zipAn improved splash screen component for MFC.(62KB)121,StackDialog.zipCreating a stacked dialog such as Netscape's 'Preferences' dialog(22KB)122,bitmappreviewdialog_src.zipThis article describes a completely object oriented standard file open dialog with preview.(12KB)123,subselect_dialog.zipSubselection Dialog(123KB)124,TabDialog.zipA docking dialog that auto-expands when the mouse passes over it(35KB)125,TcxMsgBox.zipTCX Message Box (derived from CWnd)(35KB)126,ToolTips.zipA demonstration of how to show tooltips in modal dialog bozes(23KB)127,UpdateModalDlg_demo.zipHow to update a modal dialog contents using a callback function(17KB)128,WinampWnd_demo.zipAn article discussing a Plugin for Nullsoft Winamp which looks and behaves like the Winamp UI.(43KB)129,Skins.zipA mini library to build Bitmap based skinnable apps.(174KB)130,FaderWnd_demo.zipAn MFC class to fade any window with only one line of code.(28KB)131,Win2kFileDlg.zipEver wanted to use the new Office 2000 file dialogs on Win 95/98/NT/Me, including the file previewing? Well now you can.(76KB)132,win2000fd.zipHow to show the new Common File Dialog in MFC Apps in Windows 2000(36KB)133,Wizard2000.zipCreate Windows 2000 style Wizards with white backgrounds(109KB)134,FileExportDialog.zipAdding filters to the Open File dialog(24KB)135,customize_dialog.zipCustomizing the Windows Common File Open Dialog(15KB)136,SelectFolder.zipThe windows 'Select Folder' dialog with some extra functionality(41KB)137,animate_dlg.zipAnimated Icon on Titlebar of a Dialog based Application(34KB)138,BmpDlg.zipBitmap Dialog Class(52KB)139,namespace.zipClass for Browsing shell namespace with your own dialog(78KB)140,OnUpdate_demo.zipHandling OnUpdate() processing for menu items(10KB)141,DialogUpdates.zipUsing ON_UPDATE_COMMAND_UI with all controls in a Dialog(18KB)142,override.zipCustomizing the font dialog(4KB)143,cmdlg.zipCostumizing CFileDialog(31KB)144,custom_open.zipCustom Open File or Save as Dialog(25KB)145,ColorFormView.zipCFormView Class with Custom Background Color(33KB)146,Banner.zipAnimated Background Banner(88KB)147,MDIClient.zipA Custom MDI Client Class(42KB)148,html_help_view.zipHTML Help In CView Window(5KB)149,MDIPreview_demo.zipPrint Preview in MDI Frame(20KB)150,zoom_scale.zipAdd Zoom and Scale Capabilities to CScrollView(338KB)151,autopan.zipAuto-Panning Windows(44KB)152,autopan2.zipMicrosoft Internet Explorer like Intellimouse AutoScroll(42KB)153,intellipan.zipIntellimouse panning (improved Auto-Panning Windows)(5KB)154,intellipan2.zipIntellimouse panning 2 (A universal Auto-Panning solution)(12KB)155,bigscroll.zipBreaking the CScrollView 32768 size limitation with CBigScrollView(90KB)156,variable_splitter.zipVariable splitter views(58KB)157,TabbedViews_src.zipTabbed Views(78KB)158,animate_icon_src.zipAnimated Icon on Titlebar of a window(48KB)159,msdi1632.zipMultiSingle (MSDI) Document interface(77KB)160,msdidao.zipMultiSingle (MSDI) Document interface with DAO doc(508KB)161,ScreenSwitch_demo.zipMultiple Views Using SDI(26KB)162,multiview.zipMultiple views for a single document (MDI) 3(86KB)163,WinMenu_demo.zipHome made MDI windows list in Window menu(21KB)164,SdiMulti.zipSDI Interface with Multi-Views and Multi-Splitters(88KB)165,DocViewInDll_demo.zipSeparating the views of an MDI application into different DLLs(60KB)166,MultiFrame_demo.zipMultiple frame windows in SDI application(76KB)167,mrcext.zipResizable Docking Window(862KB)168,sizing.zipSizing TabControlBar(46KB)169,devstudio.zipAnother DevStudio-alike DialogBar(43KB)170,docking.zipResizable Docking Window 2(98KB)171,simple_splitter.zipGeneral Purpose Splitter Class(43KB)172,cxysplitter.zipA pair of splitter classes used in dialogbox(21KB)173,dynamic_splitter.zipSplitter Window - "True" dynamic splitter window(52KB)174,outlook_style.zipOutook Style Splitter Bar(59KB)175,minsplit.zipMinimum size splitter(36KB)176,scrbsplt.zipRemoving and reapplying splitter windows on-the-fly in Scribble with a custom splitter window class(157KB)177,switchviews_in_splitter.zipSwitching views in splitter panes (SDI)(44KB)178,rulers_src.zipImplementing Rulers inside of Splitter Panes(5KB)179,dynamic1.zipDifferent Views In Dynamic Splitter(202KB)180,dialogstartupanimation.zipThis sample shows you how to create dialog startup animation like that of Window 98'menu(18KB)181,yqeditgridcontrol.zipa grid control that enable keyboard input. That is to say, you can write data in it. (31KB)182,switchmdiviews.zipThis sample shows you how to switch from one view to the other in a MDI splitter window application(31KB) 183,yqmdireplaceview.zipThis sample shows you how to replace different views in a MDI splitter window application(36KB) 184,switchview.zipThis sample shows you how to switch from one MDI window to another by using the "Ctrl Tab" key.(29KB) 185,filterreturnkey.zipThis sample shows you how to trap, filter the ENTER and ESCAPE key of a dialog box (17KB)186,filterkey.zipThis sample shows you how to filter a certain key and mask that key(18KB)187,editenter.zipThis sample shows you how to use RETURN key to switch among edit controls of a dialog box(18KB)188,dialoghook.zipThis sample shows you how to set keyboard hook function of a dialog box to trap RETURN ,ESCAPE key.(17KB) 189,contexthelp.zipThis sample shows you how to create context sensitive help of a control of a dialog box(26KB) 190,traparrokey.zipThis sample describes how to trap arrow keys in an control of a dialog box (18KB)191,yqadvancedbtn.zipOwner draw hot button support both bitmap and icon, with flat, gripper property. (108KB)192,drawlistbo.zipOwner draw CTabCtrl with flat gripper property (40KB)193,startupanimation.zipCreate Window startup animation, including several kind of animation style, very interesting(23KB) 194,flatlistbox.zipusing a unique way to implement flat attribute( other than those published on the codegurn), as well as hot ,gripper attribute.(21KB) 195,yqhoteditctrl.zipCreate edit control with Hot , flat, gripper. separator attributes (21KB)196,3dmdishadow.zipCreate 3D shadow of a MDI frame windows(32KB) 197,3dsdishadow.zipCreate 3D shadow of a SDI frame windows(29KB)198,getfile.zipA DDX routine for MFC to retrieve filenames(29KB)199,splasher.zipAn improved splash screen component for MFC(62KB)200,pushpin.zipA pushpin button MFC class(12KB)201,getfolder.zipA DDX routine for MFC to retrieve folders(30KB)202,ntray.zipAn MFC class to manipulate tray icons(17KB)203,hlinkctrl.zipAn MFC class to support hyperlinks on windows and dialogs(16KB)204,icondialog.zipAn icon selection dialog class for MFC(12KB)205,pushpinframe.zipAn MFC class to provide property dialogs ala Developer Studio(16KB)206,mappin.zipAn MFC class to implement map pins(286KB)207,iconcombobox.zip2 MFC classes to implement icon selection combo boxes(19KB)208,menuex_demo.zipImplementing an Ownerdrawn menu (35KB)209,bcmenu261.zipCool Owner Drawn Menus with BitmapsVersion 2.61(70KB)210,dynmenu.zipSome handy functions for adding and deleting submenus and menuitems in runtime (16KB)211,gradientmenu.zipCreate Popup menus in MFC with a gradient and text on the left side (89KB)212,menuicon_demo.zipGive your apps a unique look by adding a logo to your menu(48KB)213,bcgbappwizard.zipBCGControlBar library version 4.6(2121KB)214,mpcstatusbar.zipAn enhanced CStatusBar to easily and dynamically add/remove controls on a status bar (48KB)215,textonlystatusbar.zipAn easy to use and implement Text Only Status Bar with Tool tip text extracted from the status bar panes. (39KB)216,progressbar.zipShowing progress bar in a status bar pane(33KB)217,sizecbar_src.zipDevStudio-like docking window (64KB)218,sizing_tabct1_demo.zipCreates a dockable and resizable control bar. (46KB)219,dockview.zipA fairly simple way to incoporate views into sizing control bars(69KB)220,spin_slide_toolbar.zipHow to create toolbars with spinners and/or sliders(48KB)221,tearoffrebars_prj.zipThis article Implements the functionality similar to the Office 2000 toolbars(26KB)222,flatbar.zipA flat toolbar implementation that does not require the updated common controls library from Internet Explorer. (197KB)223,toolbar_droparrow_demo.zipDemonstrates how to use the new toolbar styles to add dropdown arrows to toolbar buttons (28KB)224,dynamictb.zipA simple tutorial that shows how to dynamically replace toolbars at runtime (35KB)225,toolbar_docking_demo.zipDemonstrates how to dock toolbars side-by-side (29KB)226,tapetoolbar.zipA spectacular variation on toolbars (35KB)227,chevions.zipAn introduction to using the cool new toolbar chevrons (18KB)228,toolgroupmanager.zipA reusable template class for managing multiple toolbars, only one of which is displayed at a time(30KB)229,toolbar_hotbuttons_demo.zipDemonstrates how to add rollover buttons to your toolbar(30KB)230,toolbar.zipWTL Tool Bar Drop-Down Extension(64KB)231,win95asm.zipIntroduction to Menus(113KB)232,outbar.zipCGfxOutBarCtrl, an Outlook98 bar-like control(163KB)233,tabstatus.zipAdvanced UI - MDI list in the status bar (and a custom Window List dialog)(62KB)234,gfxlist.zipList Control - Enhanced list control(1544KB)235,maillook.zipInternet Mail Look(42KB)236,cdxcdynamic.zipDynamic child window repositioning for dialogs, property sheets, form views and any other CWnd derived classes. (227KB)237,voicecmd.zipVoice Command Enabling Your Software (27KB)238,cj60lib.zipMFC Extension Library - CJ60 Version 6.07(1100KB)239,infobar.zipInformation Bar (62KB)240,switcher.zipA Switcher Control (like the Windows Task Bar) (40KB)
VC++ MFC 经典教程 - 基础篇 1.CP_YourFirstWindowsProgram.mp4 10.MFC_GDI_画直线和曲线.mp4 11.MFC_GDI_画椭圆_多边形及其他形状.mp4 12.MFC_GDI_画笔和画刷.mp4 13.MFC_GDI_画文本和字体.mp4 14.MFC_GDI_备用对象和取消选定.mp4 15.MFC_Ruler.mp4 16.MFC_窗口滚动条.mp4 17.MFC_Accel.mp4 18.MFC_Accel(2).mp4 19.MFC_消息框.mp4 2.Windows_编程模型.mp4 20MFC_客户区鼠标消息.mp4 21.MFC_TicTac-1.mp4 22.MFC_TicTac-2.mp4 23.MFC_TicTac-3.mp4 24.MFC_鼠标滚轮.mp4 25.MFC_捕获鼠标.mp4 26.MFC_VisualKB-1.mp4 27.MFC_VisualKB-2.mp4 29.MFC_菜单.mp4 3.MFC_第一个MFC程序设计.mp4 30.MFC_CButton类.mp4 31.MFC_E_FontView-1.mp4 32.MFC_E_FontView-2.mp4 33.MFC_CEdit类.mp4 34.MFC_MyPad.mp4 35.MFC_对话框_静态文本_编辑框.mp4 36.MFC_对话框_访问控件_7种方法_A.mp4 37.MFC_对话框_访问控件_7种方法_B.mp4 38.MFC_对话框_访问控件_7种方法_C.mp4 39.MFC_对话框_复选框_单选钮.mp4 4.MFC_消息映射.mp4 40.MFC_模态对话框.mp4 41.MFC_非模态对话框.mp4 42.MFC_属性表.mp4 43.MFC_公用对话框.mp4 44.MFC_数组类-1.mp4 45.MFC_数组类-2.mp4 46.MFC_CArray.mp4 47.MFC_列表类.mp4 48.MFC_映射类.mp4 49.MFC_类型指针类.mp4 5.MFC_使用向导快速进行MFC程序设计.mp4 50.MFC_CFile.mp4 51.MFC_CArchive.mp4 52.MFC_四个对象四种方法.mp4 53. MFC_Ruler.mp4 54.MFC_Ruler.mp4 55.MFC_Ruler.mp4 56.MFC_SdiSquares.mp4 57.MFC_Scroll_Ruler.mp4 58.MFC_CHtmlView.mp4 59.MFC_CTreeView.mp4 6.MFC_字符集和TEXT宏.mp4 60.MFC_CListView.mp4 61.MFC_MdiSquares.mp4 62.MFC_动态拆分窗口.mp4 63.MFC_ToolBar.mp4 64.MFC_ToolBar_Ex13a.mp4 65.MFC_StatusBar.mp4 66.MFC_StatusBar_Ex13b.mp4 67.MFC_Rebar.mp4 68.MFC_EZPrint.mp4 69.MFC_Print_Bubble.mp4 7.MFC_建立应用程序.mp4 8.MFC_第一个MFC程序设计(不用向导).mp4 9.MFC_Windows_GDI_设备描述表类.mp4 数据结构与算法_C语言 01.swap.mp4 02.BubbleSort.mp4 03.SelecttionSort.mp4 04.顺序查找.mp4 05.C_DS_折半查找.mp4 06.递归.mp4 07递归算法_折半查找.mp4 08.Permutations.mp4 09.插入排序.mp4 10.快速排序.mp4 11.归并排序.mp4 12.顺序栈.mp4 13.顺序队列.mp4 14.链表的基本概念.mp4 15.单链表的基本运算.mp4 16.循环单链表.mp4 17.双向链表.mp4 18.链式栈.mp4 19.链式队列.mp4 20.基数排序.mp4 21.树.mp4 22.二叉树的存储表示与实现.mp4 23.二叉树的遍历.mp4 24.二叉查找树.mp4 25.红黑树.mp4 26.堆.mp4 27.堆排序.mp4 28.哈希表.mp4 29.图_邻接矩阵
下面这个模块是我使用易语言时写补丁最常用的一个模块(当然很多也是抄的),一开始我觉得bug肯定会很多,放出去肯定又会坑很多人,后来我发现坑坑更健康,当你明白一个东西的优缺点之后,你才会更好的选择你所需要的。所以呢,现在模块开源了,希望对某些朋友有参考意义或者说使用价值吧。 声明:大家使用过程发现任何问题都不要来问我,请自己想办法解决。我现在已经完全放弃易语言了,改用VC++了。 以下是全部接口: 模块名称:sunflover.ec 作者:by sunflover 版本:2015.2 自己收集的一些常用函数,方便写补丁。 @备注: 自己收集的一些常用函数 ------------------------------ .版本 2 .子程序 Ansi2Unicode, 字节集, 公开, 将Ansi码转换为Unicode码 (返回转换后的字节集) .参数 Ansi, 文本型, , 欲转换的Ansi文本 .子程序 AntiDebug, 逻辑型, 公开, 这个没啥用,效果差;可放在程序运行的第一个函数 被调试返回真 .子程序 AntiODMenu, 逻辑型, 公开, 这个效果较好,推荐用这个;找到OD相关句柄返回真, 此函数枚举窗口通过菜单名来 判定是否OD窗口。 .子程序 AntiStrongOD, 逻辑型, 公开, 这个效果还行,检测带有驱动的 OD调试器 此函数专门对付 StrongOD 插件 .参数 判断OD运行状态, 逻辑型, 可空, 此参数作用: 发现OD驱动时 —是否检测OD运行状态作为返回值基础 ,默认判断运行状态 .子程序 Bin2Dec, 整数型, 公开, 字节集到整数 .参数 Bin, 字节集 .子程序 Bin2Hex, 文本型, 公开, 字节集到十六进制文本 .参数 字节集, 字节集 .子程序 Bin2Hex1, 文本型, 公开, 文本型->文本型 .参数 Bin, 文本型 .子程序 BinXor, 字节集, 公开, 字节集异或 .参数 需异或的字节集, 字节集, , 返回的字节集 .参数 参与异或的字节集, 字节集 .子程序 Dec2Hex, 文本型, 公开, 十到十六 .参数 十进制转换数据, 长整数型 .子程序 GetAPIAddress, 整数型, 公开, 失败返回0 .参数 模块名, 文本型, , 如"user32.dll","kernel32.dll" .参数 API, 文本型, , 如“CreateWindowExA” .子程序 Hex2Bin, 字节集, 公开, 十六进制文本到字节集 .参数 原文, 文本型 .子程序 Hex2Bin1, 文本型, 公开, 文本型->文本型 .参数 Hex, 文本型 .子程序 Hex2Dec, 整数型, 公开, 十六到十 .参数 十六进制转换数据, 文本型 .子程序 InjectDll, 逻辑型, 公开, 向目标进程注入一个指定 Dll 模块文件;注入成功返回 true, 注入失败则返回 false,CreateRemoteThread法 .参数 进程ID, 整数型, , 进程PID .参数 DLL文件名, 文本型, , 欲注入的DLL名称 .子程序 InjectDLL1, 逻辑型, 公开, SuspendThread,shellcode,SetEip .参数 PID, 整数型 .参数 DLL路径, 文本型 .子程序 InjectDLL2, 逻辑型, 公开, code cave,与InjectDLL1同 .参数 进程ID, 整数型 .参数 DLL文件名, 文本型 .子程序 inline_patch, 逻辑型, 公开, 失败返回假,成功返回真;适合patch尚未运行的加壳或不加壳的可执行文件 .参数 文件名, 文本型, , 文件全路径 .参数 模块名, 文本型, , 如"user32.dll" .参数 API, 文本型, , 如“CreateWindowExA” .参数 地址, 整数型, , 如Hex2Dec (“00401000”) .参数 数据, 字节集, , 如 Hex2Bin (“90909090”) .子程序 inline_patch_Pro, 逻辑型, 公开, 失败返回假,成功返回真;适合patch尚未运行的加壳不加壳的可执行文件,需要补丁的数据较多时建议使用这个,在子程序打补丁 .参数 文件名, 文本型, , 文件全路径 .参数 模块名, 文本型, , 如"user32.dll" .参数 API, 文本型, , 如“CreateWindowExA” .参数 子程序指针, 子程序指针, , 如&子程序1 .子程序 inline_patch_Pro1, 逻辑型, 公开, 失败返回假,成功返回真;适合patch尚未运行的加壳或不加壳的可执行文件,解码时机判断是选用VirtualProtect;如果壳检测到了,自行换用inline_patch或inline_patch_Pro .参数 文件名, 文本型, , 文件全路径 .参数 子程序指针, 子程序指针, , 如&子程序1 .参数 地址, 整数型, 可空, 如Hex2Dec (“00401000”),用来判断是否解码完成;如果没壳,就空着 .子程序 inline_patch1, 逻辑型, 公开, patch尚未运行的,没加壳的程序,并运行它 .参数 文件名, 文本型, , 文件全路径 .参数 地址, 整数型, , 如Hex2Dec (“00401000”) .参数 数据, 字节集, , 如 Hex2Bin (“90909090”) .子程序 InlinePatch, 逻辑型, 公开, 失败返回假,成功返回真;适合patch尚未运行的加壳不加壳的可执行文件,需要补丁的数据较多时建议使用这个,在子程序打补丁 .参数 文件名, 文本型, , 文件全路径,如"D:\test.exe" .参数 运行参数, 文本型, 可空, 可空,没有参数则留空,大多数情况没有参数;有参数时填写,如"-s" .参数 模块名, 文本型, , 如"user32.dll" .参数 API, 文本型, , 如“CreateWindowExA” .参数 API断次数, 整数型, 可空, 可空,有些时候需要计次,根据需要填写;一般留空即可,留空表示断第一次,就开始补丁 .参数 补丁子程序, 子程序指针, , 如&子程序1 .参数 寄存器结构体, context_, 参考 可空, 可空,CONTEXT,返回寄存器结构体,方便写补丁函数;这个属于高级功能,看不懂的话就留空吧 .参数 进程信息结构体, PROCESS_INFORMATION, 参考 可空, 可空,PROCESS_INFORMATION,返回进程信息结构体,方便写补丁函数;这个属于高级功能,看不懂的话就留空吧 .子程序 OpenProcessPro, 整数型, 公开, 返回句柄权限是完全访问 .参数 PID, 整数型 .子程序 OpenThreadPro, 整数型, 公开, 返回句柄权限是完全访问 .参数 进程ID, 整数型 .子程序 Unicode2Ansi, 文本型, 公开, 将Unicode码转换为Ansi码 (返回转换后的文本) .参数 Unicode, 字节集, , 欲转换的Unicode字节集 .子程序 UnInjectDLL1, 逻辑型, 公开, SuspendThread,shellcode,SetEip .参数 PID, 整数型 .参数 DLL路径, 文本型 .子程序 UnInjectDLL2, 逻辑型, 公开, 远程时钟卸载dll .参数 参数_窗口句柄, 整数型, , FindWindow(字符 (0),“计算器”) .参数 参数_DLL路径, 文本型, , '可以是DLL全路径也可以只是DLL名称 .子程序 超级延时, , 公开, 高精度延时,cpu占用低,窗口不卡死,一次最大可延时几年 (无返回值) .参数 延时间隔, 整数型, , 1000微秒 = 1毫秒 ; 1000毫秒 = 1秒 .参数 延时单位, 整数型, 可空, 可空:毫秒 0 毫秒 1 微秒 2 秒 3 分 4 小时 5 天 .子程序 打开保存文件对话框, 文本型, 公开, 未提示 是否有重复的文件存在 自己注意一下 .参数 窗口句柄, 整数型, 可空, 调用处窗口句柄 .参数 窗口标题, 文本型, 可空, 对话框窗口标题 .参数 过滤器, 文本型, 可空, 格式:“MP3文件(*.mp3)|*.mp3|媒体文件(*.mpg)|*.mpg” .参数 初始路径, 文本型, 可空, 可以被省略。如果本参数被省略,默认从“我的文档”开始。否则,请给出盘符,如“d:” .子程序 打开多文件对话框, 文本型, 公开, 如果多选文件,返回文件路径以“;”(半角分号)分隔。失败或取消返回空文本。 .参数 窗口句柄, 整数型, 可空, 调用处窗口句柄 .参数 窗口标题, 文本型, 可空, 对话框窗口标题 .参数 过滤器, 文本型, 可空, 格式:“MP3文件(*.mp3)|*.mp3|媒体文件(*.mpg)|*.mpg” .参数 初始路径, 文本型, 可空, 可以被省略。如果本参数被省略,默认从“我的文档”开始。否则,请给出盘符,如“d:” .参数 窗口风格, 整数型, 可空, 可以被省略。如果本参数被省略,默认为 0 。位置值从 0 开始。从0-11之间,可以设置多种窗口风格。0.工具栏、只读选择框-未选;1.工具栏、只读选择框-选;2.工具栏;3.工具栏、只读选择框-未选,帮助按钮;4.工具栏、只读选择框-选,帮助按钮;5.工具栏,帮助按钮;6.普通风格、只读选择框-未选;7.普通风格、只读选择框-选;8.普通风格;9.普通风格、只读选择框-未选,帮助按钮;10.普通风格、只读选择框-选,帮助按钮;11.普通风格、帮助按钮。 .子程序 读内存字节集, 字节集, 公开, 从内存读取字节集数据(返回字节集,失败返回0字节长度的空字节集) .参数 进程ID, 整数型, , 进程ID .参数 地址, 整数型, , 内存地址 .参数 长度, 整数型, , 欲读取内存数据的长度 .子程序 复制文件夹, 逻辑型, 公开, 可复制文件,也可复制目录。成功返回真,失败返回假。 .参数 被复制的文件或目录, 文本型 .参数 复制到的位置, 文本型 .子程序 恢复进程, 逻辑型, 公开 .参数 PID, 整数型 .子程序 结束进程, 逻辑型, 公开 .参数 进程ID, 整数型 .子程序 进程取ID, 整数型, 公开, 取指定进程的进程ID(返回第一个进程ID,失败返回空信息) .参数 进程名, 文本型, , 程序进程名(不区分大小写!) .子程序 进程是否存在1, 逻辑型, 公开 .参数 进程ID, 整数型 .子程序 进程是否存在2, 逻辑型, 公开 .参数 进程名, 文本型 .子程序 蓝屏, , 公开, 惩罚破解者函数 。 在确定当前程序被调试后 可使用此函数让系统蓝屏。 慎重使用! .子程序 内存补丁, 逻辑型, 公开, 根据进程名补丁内存,patch已经运行的可执行文件 .参数 进程名, 文本型, , '完整的文件名,注意大小写 .参数 地址, 文本型, , 需patch地址,如“00401000” .参数 代码, 文本型, , 被替换的代码,如“90909090” .子程序 内存补丁1, 逻辑型, 公开, 根据进程ID补丁内存,patch已经运行的可执行文件 .参数 进程ID, 整数型, , 要补丁的进程ID .参数 地址, 文本型, , 需patch地址,如“00401000” .参数 代码, 文本型, , 被替换的代码,如“90909090” .子程序 内存搜索, 整数型, 公开, 某些情况,需提升权限(返回结果数目,失败返回0),返回搜索到的数目 .参数 进程ID, 整数型, , 进程ID .参数 搜索内容, 字节集, , 欲搜索的内容 其他类型-需自行转换为字节集类型 .参数 结果数组, 整数型, 参考 数组, 用来保存搜索的结果 .子程序 取汇编指令长度, 整数型, 公开, 返回指定进程指定地址处的首条汇编指令的长度。注:计算方法使用的是LDX32 .参数 进程ID, 整数型, , 进程ID .参数 地址, 整数型, , 指令地址,如Hex2Dec("00401000") .子程序 取寄存器值, 文本型, 公开, 适用于明码读码,运行到地址处读真码;如 取寄存器值(文件名,"user32.dll",“CreateWindowExA”,Hex2Dec (“00401000”),“Eax”) .参数 文件名, 文本型, , 文件全路径 .参数 模块名, 文本型, , 如"user32.dll" .参数 API, 文本型, , 如“CreateWindowExA”,这里主要为了解码时机 .参数 地址, 整数型, , 如Hex2Dec (“00401000”) .参数 寄存器, 文本型, , 可选Dr0-Dr7,Eax,Ecx,Ebx,Edx,Ebp,Esp,Eip,Edi,Esi,SegGs,SegFs,SegEs,SegDs,SegCs,EFlags,Esp,SegSs .子程序 取进程主线程, 整数型, 公开, 失败返回0 .参数 进程ID, 整数型 .子程序 取路径目录, 文本型, 公开, 返回一个文件所在目录,如"C:\Program Files\WinRAR\WinRAR.exe",返回"C:\Program Files\WinRAR" .参数 路径, 文本型, , 如"C:\Program Files\WinRAR\WinRAR.exe" .子程序 取路径文件名, 文本型, 公开, 根据文件路径获取文件名 .参数 路径, 文本型, , 文件完整路径 .子程序 取线程起始地址, 整数型, 公开, 失败返回0 .参数 参数_dwThreadId, 整数型 .子程序 去除空格, 文本型, 公开 .参数 文本, 文本型 .子程序 设置颜色对话框, 逻辑型, 公开, 例如:如果真 (设置颜色对话框 (取窗口句柄 (), j));编辑框1.文本颜色 = 到整数 (j)。 .参数 窗口句柄, 整数型 .参数 返回_颜色, 文本型, , 返回的颜色~~需要传回整数 .子程序 申请内存Pro, 整数型, 公开, 成功返回申请的首地址,失败返回0;申请的内存可读可写可执行 .参数 进程ID, 整数型, , .参数 申请内存大小, 整数型 .子程序 释放内存Pro, 逻辑型, 公开 .参数 进程ID, 整数型, , .参数 内存地址, 整数型 .子程序 特征码模糊搜索, 整数型, 公开, 最多支持三段通配符如“68 00 00 00 40 ?? ?? ?? ?? ?? ?? ?? ?? 50 E8 ?? ?? ?? ?? 12 34 ?? ?? ?? ?? 85 69” .参数 进程ID, 整数型, , 进程ID .参数 特征码, 文本型, , 十六进制文本,如“68 00 00 00 40 ?? ?? ?? ?? ?? ?? ?? ?? 50 E8” .参数 结果数组, 整数型, 参考 数组, 用来保存搜索的结果 .参数 偏移, 整数型, 可空, 默认为0 .参数 起始地址, 文本型, 可空, 默认为“00400000” .参数 结束地址, 文本型, 可空, 默认为“00800000” .子程序 提升进程权限, 逻辑型, 公开 .参数 目标进程, 整数型, 可空 .参数 权限类别, 文本型, 可空, 默认为“SeDebugPrivilege”;可选“SeDebugPrivilege”,“SeShutdownPrivilege”,“SeRestorePrivilege”,“SeBackupPrivilege” .子程序 写内存字节集, 逻辑型, 公开, 往内存写入字节集数据(成功返回真,失败返回假);注:内部有VirtualProtectEx处理 .参数 进程ID, 整数型, , 进程ID .参数 地址, 整数型, , 内存地址 .参数 数据, 字节集, , 写入数据 如果为其它数据类型,可以用 到字节集() 将数据转换为字节集 .参数 写入长度, 整数型, 可空, 默认为全部数据,(参考: 1字节型 2短整数型 4长整数型,小数型,指针 8长整数型,双精度小数型,日期时间型) .子程序 移动文件夹, 逻辑型, 公开, 可移动文件,也可移动目录。成功返回真,失败返回假。 .参数 被移动的文件或目录, 文本型 .参数 移动到的位置, 文本型 .子程序 隐藏进程, 逻辑型, 公开, hide.dll,会被误报,大家看着处理 .参数 进程ID, 整数型 .子程序 暂停进程, 逻辑型, 公开 .参数 PID, 整数型 .子程序 终止进程Pro, , 公开, 终止进程,终止所有指定进程 .参数 进程名, 文本型, , 程序进程名(不区分大小写!) .子程序 终止线程, 逻辑型, 公开, 成功返回真 失败返回假 .参数 参数_线程ID, 整数型 .数据类型 context_, 公开, 公开 .成员 ContextFlags, 整数型 .成员 Dr0, 整数型 .成员 Dr1, 整数型 .成员 Dr2, 整数型 .成员 Dr3, 整数型 .成员 Dr4, 整数型 .成员 Dr5, 整数型 .成员 Dr6, 整数型 .成员 Dr7, 整数型 .成员 ControlWord, 整数型 .成员 StatusWord, 整数型 .成员 TagWord, 整数型 .成员 ErrorOffset, 整数型 .成员 ErrorSelector, 整数型 .成员 DataOffset, 整数型 .成员 DataSelector, 整数型 .成员 RegisterArea, 字节型, , "72" .成员 Cr0NpxState, 整数型 .成员 SegGs, 整数型 .成员 SegFs, 整数型 .成员 SegEs, 整数型 .成员 SegDs, 整数型 .成员 Edi, 整数型 .成员 Esi, 整数型 .成员 Ebx, 整数型 .成员 Edx, 整数型 .成员 Ecx, 整数型 .成员 Eax, 整数型 .成员 Ebp, 整数型 .成员 Eip, 整数型 .成员 SegCs, 整数型 .成员 EFlags, 整数型 .成员 Esp, 整数型 .成员 SegSs, 整数型 .成员 reserve, 字节型, , "512" .数据类型 FLOATING_SAVE_AREA, 公开 .成员 ControlWord, 整数型 .成员 StatusWord, 整数型 .成员 TagWord, 整数型 .成员 ErrorOffset, 整数型 .成员 ErrorSelector, 整数型 .成员 DataOffset, 整数型, , , ; .成员 DataSelector, 整数型 .成员 RegisterArea, 字节型, , "80" .成员 Cr0NpxState, 整数型 .数据类型 LuID, 公开 .成员 lowpart, 整数型 .成员 highpart, 整数型 .数据类型 MEMORY_BASIC_INFORMATION, 公开 .成员 BaseAddress, 整数型 .成员 AllocationBase, 整数型 .成员 AllocattionProtect, 整数型 .成员 RegionSize, 整数型 .成员 State, 整数型 .成员 Protect, 整数型 .成员 Type, 整数型 .数据类型 MODULEENTRY32, 公开, MODULEENTRY32 .成员 dwSize, 整数型, , , dwSize .成员 th32ModuleID, 整数型, , , th32ModuleID .成员 th32ProcessID, 整数型, , , th32ProcessID .成员 GlblcntUsage, 整数型, , , GlblcntUsage .成员 ProccntUsage, 整数型, , , ProccntUsage .成员 modBaseAddr, 整数型, , , modBaseAddr .成员 modBaseSize, 整数型, , , modBaseSize .成员 hModule, 整数型, , , hModule .成员 szModule, 字节型, , "256", 模块名称 .成员 szExePath, 字节型, , "260", 文件路径 .数据类型 PROCESS_BASIC_INFORMATION, 公开 .成员 ExitStatus, 整数型 .成员 PebBaseAddress, 整数型 .成员 AffinityMask, 整数型 .成员 BasePriority, 整数型 .成员 UniqueProcessId, 整数型 .成员 InheritedFromUniqueProcessId, 整数型 .数据类型 PROCESS_INFORMATION, 公开 .成员 hProcess, 整数型 .成员 hThread, 整数型 .成员 dwProcessId, 整数型 .成员 dwThreadId, 整数型 .数据类型 SECURITY_ATTRIBUTES, 公开, , SECURITY_ATTRIBUTES .成员 nLength, 整数型 .成员 lpSecurityDescriptor, 整数型 .成员 bInheritHandle, 整数型 .数据类型 SHFILEOPSTRUCT, 公开 .成员 句柄, 整数型 .成员 wFunc, 整数型 .成员 pFrom, 字节集 .成员 pTo, 字节集 .成员 fFlags, 短整数型 .成员 fAnyOperationsAborted, 整数型 .成员 hNameMappings, 整数型 .成员 lpszProgressTitle, 文本型 .数据类型 STARTUPINFO, 公开 .成员 cb, 整数型 .成员 lpReserved, 文本型 .成员 lpDesktop, 文本型 .成员 lpTitle, 文本型 .成员 dwX, 整数型 .成员 dwY, 整数型 .成员 dwXSize, 整数型 .成员 dwYSize, 整数型 .成员 dwXCountChars, 整数型 .成员 dwYCountChars, 整数型 .成员 dwFillAttribute, 整数型 .成员 dwFlags, 整数型 .成员 wShowWindow, 短整数型 .成员 cbReserved2, 短整数型 .成员 lpReserved2, 整数型 .成员 hStdInput, 整数型 .成员 hStdOutput, 整数型 .成员 hStdError, 整数型 .数据类型 STARTUPINFO1, 公开 .成员 cb, 整数型 .成员 lpReserved, 整数型 .成员 lpDesktop, 整数型 .成员 lpTitle, 整数型 .成员 dwX, 整数型 .成员 dwY, 整数型 .成员 dwXSize, 整数型 .成员 dwYSize, 整数型 .成员 dwXCountChars, 整数型 .成员 dwYCountChars, 整数型 .成员 dwFillAttribute, 整数型 .成员 dwFlags, 整数型 .成员 wShowWindow, 短整数型 .成员 cbReserved2, 短整数型 .成员 lpReserved2, 字节型 .成员 hStdInput, 整数型 .成员 hStdOutput, 整数型 .成员 hStdError, 整数型 .数据类型 THREADENTRY32, 公开 .成员 dwsize, 整数型 .成员 cntUsage, 整数型 .成员 th32ThreadID, 整数型 .成员 th32OwnerProcessID, 整数型 .成员 tpBasePri, 长整数型 .成员 tpDeltaPri, 长整数型 .成员 dwFlags, 整数型 .数据类型 窗口句柄类, 公开 .成员 句柄, 整数型 .成员 标题, 文本型 .成员 类名, 文本型 .数据类型 打开文件名, 公开, OPENFILENAME .成员 结构大小, 整数型, , , lStructSize .成员 窗口句柄, 整数型, , , hwndOwner .成员 实例句柄, 整数型, , , hInstance .成员 过滤器, 字节集, , , lpstrFilter .成员 自定义过滤器, 文本型, , , lpstrCustomFilter .成员 自定义过滤器最大长度, 整数型, , , nMaxCustFilter .成员 过滤器索引, 整数型, , , nFilterIndex .成员 文件名, 字节集, , , lpstrFile .成员 文件名最大长度, 整数型, , , nMaxFile .成员 文件标题, 文本型, , , lpstrFileTitle .成员 文件标题最大长度, 整数型, , , nMaxFileTitle .成员 初始目录, 文本型, , , lpstrInitialDir .成员 标题, 文本型, , , lpstrTitle .成员 标志, 整数型, , , flags .成员 文件偏移量, 整数型, , , nFileOffset .成员 文件扩展名, 整数型, , , nFileExtension .成员 默认扩展名, 文本型, , , lpstrDefExt .成员 自定义数据, 整数型, , , lCustData .成员 回调函数地址, 整数型, , , lpfnHook .成员 模板名, 文本型, , , lpTemplateName .数据类型 函数信息, 公开 .成员 模块索引, 整数型 .成员 ThunkRav, 文本型 .成员 Thunk偏移, 文本型 .成员 Thunk值, 文本型 .成员 序数, 文本型 .成员 名称, 文本型 .数据类型 寄存器, 公开 .成员 标记, 整数型 .成员 dr0, 整数型 .成员 dr1, 整数型 .成员 dr2, 整数型 .成员 dr3, 整数型 .成员 dr6, 整数型 .成员 dr7, 整数型 .成员 FloatSave, FLOATING_SAVE_AREA .成员 seggs, 整数型 .成员 segfs, 整数型 .成员 seges, 整数型 .成员 segds, 整数型 .成员 edi, 整数型 .成员 esi, 整数型 .成员 ebx, 整数型 .成员 edx, 整数型 .成员 ecx, 整数型 .成员 eax, 整数型 .成员 ebp, 整数型 .成员 eip, 整数型 .成员 SegCs, 整数型 .成员 eflags, 整数型 .成员 esp, 整数型 .成员 SegSs, 整数型 .数据类型 进程信息, 公开, 进程信息 .成员 dwSize, 整数型 .成员 cntUsage, 整数型 .成员 进程ID, 整数型 .成员 th32DefaultHeapID, 整数型 .成员 th32ModuleID, 整数型 .成员 cntThreads, 整数型 .成员 th32ParentProcessID, 整数型 .成员 pcPriClassBase, 整数型 .成员 dwFlags, 整数型 .成员 进程名称, 字节型, , "256" .数据类型 逻辑字体, 公开, $(a)LOGFONT .成员 高度, 整数型, , , lfHeight .成员 宽度, 整数型, , , lfWidth .成员 控制摆, 整数型, , , lfEscapement .成员 定方位, 整数型, , , lfOrientation .成员 加粗, 整数型, , , lfWeight .成员 斜体, 字节型, , , lfItalic .成员 下划线, 字节型, , , lfUnderline .成员 删除线, 字节型, , , lfStrikeOut .成员 零碎工作组合, 字节型, , , lfCharSet .成员 出自精确, 字节型, , , lfOutPrecision .成员 修剪精确, 字节型, , , lfClipPrecision .成员 性质, 字节型, , , lfQuality .成员 间距, 字节型, , , lfPitchAndFamily .成员 字体名称, 字节型, , "32", 用LF_FACESIZE,lfFaceName? .数据类型 色盒, 公开 .成员 lStructsize, 整数型 .成员 hwndOwner, 整数型 .成员 hInstance, 整数型 .成员 rgbResult, 整数型 .成员 lpCustColors, 文本型, , , 可以指定16个数组,也可以不用指定,但无论用否,必须传址 .成员 flags, 整数型 .成员 lCustData, 整数型 .成员 lpfnHook, 子程序指针 .成员 lpTemplateName, 文本型 .数据类型 设定执行文件信息, 公开, SHELLEXECUTEINFO .成员 结构大小, 整数型, , , cbSize .成员 标志, 整数型, , , fMask .成员 窗口句柄, 整数型, , , hwnd .成员 操作命令, 文本型, , , lpVerb .成员 文件名, 文本型, , , lpFile .成员 应用程序参数, 文本型, , , lpParameters .成员 目录, 文本型, , , lpDirectory .成员 显示标志, 整数型, , , nShow .成员 实例句柄, 整数型, , , hInstApp .成员 项目标识符列表结构指针, 整数型, , , lpIDList .成员 文件类别, 文本型, , , lpClass .成员 热键句柄, 整数型, , , hkeyClass .成员 热键, 整数型, , , dwHotKey .成员 图标句柄, 整数型, , , hIcon .成员 进程句柄, 整数型, , , hProcess .数据类型 文件夹信息, 公开, BROWSEINFO .成员 窗口句柄, 整数型, , , hOwner .成员 根目录, 整数型, , , pidlRoot .成员 显示名称, 文本型, , , pszDisplayName .成员 标题, 文本型, , , lpszTitle .成员 标志, 整数型, , , ulFlags .成员 回调函数地址, 整数型, , , lpfn .成员 回调函数参数, 整数型, , , lParam .成员 图像索引, 整数型, , , iImage .数据类型 项目标识符列表, 公开, ITEMIDLIST .成员 结构大小, 整数型, , , cb .成员 标识符长度, 字节型, , "255", abID .数据类型 选择字体, 公开, CHOOSEFONT .成员 结构大小, 整数型, , , lStructSize .成员 窗口句柄, 整数型, , , hwndOwner,caller's window handle .成员 设备场景句柄, 整数型, , , hDC,printer DC/IC or NULL .成员 字体结构指针, 整数型, , , lpLogFont‘ptr. to a LOGFONT struct .成员 点大小, 整数型, , , iPointSize,10 * size in points of selected font .成员 标志, 整数型, , , flags,enum. type flags .成员 颜色值, 整数型, , , rgbColors,returned text color .成员 自定义数据, 整数型, , , lCustData,data passed to hook fn. .成员 回调函数地址, 整数型, , , lpfnHook,ptr. to hook function .成员 模板名称, 文本型, , , lpTemplateName,custom template name .成员 实例句柄, 整数型, , , hInstance,instance handle of.EXE that contains cust. dlg. template .成员 字体风格, 文本型, , , lpszStyle,return the style field here must be LF_FACESIZE(32) or bigger .成员 字体类型, 短整数型, , , nFontType,same value reported to the EnumFonts,call back with the extra FONTTYPE_ bits added .成员 空白队列, 短整数型 .成员 最小尺寸, 整数型 .成员 最大尺寸, 整数型 .数据类型 字体信息, 公开 .成员 名称, 文本型 .成员 大小, 整数型 .成员 颜色, 整数型 .成员 类型, 整数型 .成员 斜体, 整数型 .成员 下划线, 整数型 .程序集 IATHOOK类, , 公开 .子程序 APIAddr, 整数型, 公开, '此方法放在IATHOOK后调用方可成功,失败返回0 .子程序 IATHook, 逻辑型, 公开, 完事后注意调用IATUnHook .参数 进程ID, 整数型, 可空, '为空表示自身进程 .参数 模块名, 文本型, , 需加后缀,如“user32.dll” .参数 函数名, 文本型, , 注意大小写,如“MessageBoxA” .参数 新地址, 整数型, , 到整数 (&HookCallBack) .子程序 IATUnHook, 逻辑型, 公开, 与IATHOOK参数完全相同 .参数 进程ID, 整数型, 可空, 为空表示本进程 .参数 模块名, 文本型, , 需加后缀,如“user32.dll” .参数 函数名, 文本型, , 注意大小写,如“MessageBoxA” .参数 地址, 整数型, , 与IATHOOK最后一个参数相同 .程序集 PE类, , 公开, 获取可执行程序入口点,附加数据; .子程序 GetEntryPoint, 整数型, 公开, 获取的是OEP,即EP+imagebase .参数 全文件路径, 文本型, , 要处理的文件全路径 .子程序 overlay, 字节集, 公开, 获取PE文件的附加数据 .参数 全文件路径, 文本型, , 要处理的文件全路径 .程序集 超级解压类, , 公开, 调用7z解压文件,支持7z,zip,rar等压缩文件的带密码解压 .子程序 超级解压, 逻辑型, 公开, 解压压缩文件,支持rar,zip,7z等等压缩文件的解压,支持带密码解压 .参数 待解压文件, 文本型, , 欲解压的文件的全路径 .参数 解压到的目录, 文本型, , 欲解压到的路径 .参数 解压密码, 文本型, 可空, 解压所用密码,没有密码就不填 .程序集 汇编类, , 公开, 用于辅助生成shellcode,返回值都是字节集 .子程序 add_eax_char, 字节集, 公开, 占用3个字节,char值在0-127之间,返回汇编指令对应的字节集 .参数 char, 字节型, , add eax,1,参数为1,注意进制;16进制,请用Hex2Dec(Hex)转换 .子程序 add_eax_Num, 字节集, 公开, 占用5个字节,返回汇编指令对应的字节集 .参数 Num, 整数型, , add eax,8,参数为8,注意进制;16进制,请用Hex2Dec(Hex)转换 .子程序 add_esp_char, 字节集, 公开, 占用3个字节,char值在0-127之间,返回汇编指令对应的字节集 .参数 char, 字节型, , add esp,8,参数为8,注意进制;16进制,请用Hex2Dec(Hex)转换 .子程序 call, 字节集, 公开, 占用5个字节,call转换,返回汇编指令对应的字节集,此处为十进制,想用16进制,请自行转换;示例:call (Hex2Dec (“402000”), Hex2Dec (“401000”)) .参数 call到的地址, 整数型, , 00401000 call 00402000,参数为00402000 .参数 call所在的地址, 整数型, , 00401000 call 00402000,参数为00401000 .子程序 call_API, 字节集, 公开, 占用5个字节,如00401000 call MessageBoxA .参数 call所在地址, 整数型, , 自行转换,Hex2Dec("00401000") .参数 lpProcName, 文本型, , 如MessageBoxA .参数 hModule, 文本型, , 如user32.dll .子程序 call_API_FF15, 字节集, 公开, 占用6个字节,如00401000 call MessageBoxA .参数 lpProcName, 文本型, , 如MessageBoxA .参数 hModule, 文本型, , 如user32.dll .子程序 call_eax, 字节集, 公开, 占用2个字节,返回汇编指令对应的字节集 .子程序 call_FF15, 字节集, 公开, 占用6个字节,call转换,返回汇编指令对应的字节集,此处为十进制,想用16进制,请自行转换;示例:call (Hex2Dec (“402000”)) .参数 call到的地址, 整数型, , 00401000 call 00402000,参数为00402000 .子程序 jmp, 字节集, 公开, 占用5个字节,jmp转换,返回汇编指令对应的字节集,此处为十进制,想用16进制,请自行转换;jmp (Hex2Dec (“402000”), Hex2Dec (“401000”)) .参数 jmp_to, 整数型, , 00401000 jmp 00402000,参数为00402000 .参数 jmp_from, 整数型, , 00401000 jmp 00402000,参数为00401000 .子程序 jmp_FF25, 字节集, 公开, 占用6个字节,jmp转换,返回汇编指令对应的字节集,此处为十进制,想用16进制,请自行转换;jmp (Hex2Dec (“402000”)) .参数 jmp_to, 整数型, , 00401000 jmp 00402000,参数为00402000 .子程序 mov_eax_Num, 字节集, 公开, 占用5个字节,返回汇编指令对应的字节集 .参数 Num, 整数型, , 自己注意进制,mov eax,401000,参数为Hex2Dec(“401000”) .子程序 nop, 字节集, 公开, 占用个字节,返回汇编指令对应的字节集 .子程序 popad, 字节集, 公开, 占用1个字节,返回汇编指令对应的字节集 .子程序 popfd, 字节集, 公开, 占用1个字节,返回汇编指令对应的字节集 .子程序 push_char, 字节集, 公开, 占用2个字节,char值在0-127之间,返回汇编指令对应的字节集 .参数 char, 字节型, , push 8,参数为8,注意进制;16进制,请用Hex2Dec(Hex)转换 .子程序 push_eax, 字节集, 公开, 占用1个字节,返回汇编指令对应的字节集 .子程序 push_ebp, 字节集, 公开, 占用1个字节,返回汇编指令对应的字节集 .子程序 push_ebx, 字节集, 公开, 占用1个字节,返回汇编指令对应的字节集 .子程序 push_ecx, 字节集, 公开, 占用1个字节,返回汇编指令对应的字节集 .子程序 push_edi, 字节集, 公开, 占用1个字节,返回汇编指令对应的字节集 .子程序 push_edx, 字节集, 公开, 占用1个字节,返回汇编指令对应的字节集 .子程序 push_esi, 字节集, 公开, 占用1个字节,返回汇编指令对应的字节集 .子程序 push_esp, 字节集, 公开, 占用1个字节,返回汇编指令对应的字节集 .子程序 push_Num, 字节集, 公开, 占用5个字节,返回汇编指令对应的字节集 .参数 Num, 整数型, , push 401000,参数为Hex2Dec(401000),注意进制;16进制,请用Hex2Dec(Hex)转换 .子程序 pushad, 字节集, 公开, 占用1个字节,将通用寄存器的内容压入堆栈;返回汇编指令对应的字节集 .子程序 pushfd, 字节集, 公开, 占用1个字节,本指令可以把标志寄存器的内容保存到堆栈去;返回汇编指令对应的字节集 .子程序 retn, 字节集, 公开, 占用1个字节,返回汇编指令对应的字节集 .子程序 retn_n, 字节集, 公开, 占用3个字节,返回汇编指令对应的字节集 .参数 n, 短整数型, , retn 3,参数填3,注意进制;16进制,请用Hex2Dec(Hex)转换 .子程序 xor_eax_eax, 字节集, 公开, 占用2个字节,返回汇编指令对应的字节集 .子程序 xor_ebx_ebx, 字节集, 公开, 占用2个字节,返回汇编指令对应的字节集 .子程序 xor_ecx_ecx, 字节集, 公开, 占用2个字节,返回汇编指令对应的字节集 .子程序 xor_edi_edi, 字节集, 公开, 占用2个字节,返回汇编指令对应的字节集 .子程序 xor_edx_edx, 字节集, 公开, 占用2个字节,返回汇编指令对应的字节集 .子程序 xor_esi_esi, 字节集, 公开, 占用2个字节,返回汇编指令对应的字节集 .程序集 内存DLL注入类, , 公开, 可能还有点问题 .子程序 取DLL函数地址, 整数型, 公开, 返回已经注入到指定进程内的DLL的函数地址。失败返回0。 .参数 DLL函数名, 文本型, , 区分大小写。 .子程序 是否已注入, 逻辑型, 公开, 已注入返回真,未注入返回假。 .子程序 卸载DLL, 逻辑型, 公开, 卸载已经注入的内存的DLL,成功返回真,失败返回假.(最好不要卸载,卸载的话被注入的进程很容易崩溃) .子程序 执行DLL函数, 整数型, 公开, 执行已经注入到指定进程内的DLL的函数,成功返回所执行的函数的地址,失败返回0。 .参数 DLL函数名, 文本型, , 区分大小写。 .参数 等待函数执行完毕, 逻辑型, 可空, 默认为假,为真则函数执行完毕后本函数才返回。 .参数 返回值, 整数型, 参考 可空, 如果上一个参数为真,则可提供一个变量保存被执行的DLL函数的返回值。 .参数 线程句柄, 整数型, 参考 可空, 可提供变量保存函数执行线程的句柄,不需要请留空.接收了句柄记得不用时要关闭. .参数 参数1, 整数型, 可空, 可提供给被执行函数最多10个参数(理论上支持无限个,自己看着改吧)不需要的请留空。 .参数 参数2, 整数型, 可空, 非整数型参数需传递变量的内存数据指针,该指针必须是在目标进程内的。 .参数 参数3, 整数型, 可空, 提供的参数请与所执行的函数的参数个数一致,否则被注入的进程绝对会崩溃! .参数 参数4, 整数型, 可空 .参数 参数5, 整数型, 可空 .参数 参数6, 整数型, 可空 .参数 参数7, 整数型, 可空 .参数 参数8, 整数型, 可空 .参数 参数9, 整数型, 可空 .参数 参数10, 整数型, 可空 .子程序 注入DLL, 整数型, 公开, 成功返回DLL的模块句柄,失败或已注入返回0。 .参数 进程句柄, 整数型, , 句柄必须拥有对被注入进程的完全操作权限。注入后如果没有其他用处可以关闭该句柄。 .参数 DLL数据, 字节集 .程序集 取机器码类, , 公开, 获取硬件信息,硬盘等等 .子程序 取3段机器码, 文本型, 公开, 获取3段32位机器码,如1111111111-2222222222-3333333333 .参数 bios, 逻辑型, 可空, 填 假 表示此段全为0,可空,默认为真 .参数 HardDisk, 逻辑型, 可空, 填 假 表示此段全为0,可空,默认为真 .参数 MAC, 逻辑型, 可空, 填 假 表示此段全为0,可空,默认为真 .子程序 取4段机器码, 文本型, 公开, 获取4段23位机器码,如11111-22222-33333-44444 .参数 bios, 逻辑型, 可空, 填 假 表示此段全为0,可空,默认为真 .参数 HardDisk, 逻辑型, 可空, 填 假 表示此段全为0,可空,默认为真 .参数 Video, 逻辑型, 可空, 填 假 表示此段全为0,可空,默认为真 .参数 MAC, 逻辑型, 可空, 填 假 表示此段全为0,可空,默认为真 .DLL命令 _窗口是否可见, 整数型, "user32", "IsWindowVisible", 公开, 判断窗口是否可见 如窗口可见则返回TRUE(非零) .参数 窗口句柄, 整数型, , 要测试的那个窗口的句柄 .DLL命令 AdjustTokenPrivileges, 逻辑型, "advapi32.dll", "AdjustTokenPrivileges", 公开 .参数 TokenHandle, 整数型 .参数 DisableAllPrivileges, 整数型 .参数 NewState, , 传址 .参数 BufferLength, 整数型 .参数 PreviousState, , 传址 .参数 ReturnLength, 整数型, 传址 .DLL命令 API_IsDebuggerPresent, 整数型, "kernel32.dll", "IsDebuggerPresent", 公开 .DLL命令 CallNextHookEx, 整数型, "user32.dll", "CallNextHookEx", 公开 .参数 hhk, 整数型, , 钩子句柄 .参数 nCode, 整数型, , 钩子类型 .参数 wParam, 整数型 .参数 LPARAM, 整数型 .DLL命令 CloseHandle, 整数型, "kernel32.dll", "CloseHandle", 公开, 关闭一个内核对象。其包括文件、文件映射、进程、线程、安全和同步对象等。涉及文件处理时,这个函数通常与vb的close命令相似。应尽可能的使用close,因为它支持vb的差错控制。注意这个函数使用的文件句柄与vb的文件编号是完全不同的 非零表示成功,零表示失败。会设置GetLastError .参数 对象句柄, 整数型, , 欲关闭的一个对象的句柄; .DLL命令 CreateFileA, 整数型, "kernel32.dll", "CreateFileA", 公开, , 成功返回文件句柄,失败返回0 .参数 打开文件名, 文本型, , lpFileName,要打开的文件的名字 .参数 访问权限, 整数型, , dwDesiredAccess,访问权限 .参数 共享方式, 整数型, , dwShareMode,共享方式 .参数 安全特性, SECURITY_ATTRIBUTES, 传址, lpSecurityAttributes,安全特性信息 .参数 创建方式, 整数型, , dwCreationDisposition,创建方式 .参数 文件属性, 整数型, , dwFlagsAndAttributes,参见相关帮助 .参数 从文件复制文件属性, 整数型, , hTemplateFile,参见相关帮助 .DLL命令 CreateProcess, 整数型, "kernel32.dll", "CreateProcessA", 公开, CreateProcess(编辑框1.内容, “”, 0, 0, 0, 4, 0, 取运行目录(), si, pi) .参数 lpApplicationName, 文本型 .参数 lpCommandLine, 文本型 .参数 lpProcessAttributes, 整数型 .参数 lpThreadAttributes, 整数型 .参数 bInheritHandles, 整数型 .参数 dwCreationFlags, 整数型, , 0正常,4挂起,3调试,6调试挂起 .参数 lpEnvironment, 整数型 .参数 lpCurrentDriectory, 文本型 .参数 lpStartupInfo, STARTUPINFO, 传址 .参数 lpProcessInformation, PROCESS_INFORMATION, 传址 .DLL命令 CreateRemoteThread, 整数型, "kernel32", "CreateRemoteThread", 公开, 在另一进程建立线索 .参数 hProcess, 整数型 .参数 lpThreadAttributes, 整数型 .参数 dwStackSize, 整数型 .参数 lpStartAddress, 整数型 .参数 lpParameter, 整数型 .参数 dwCreationFlags, 整数型 .参数 lpThreadId, 整数型, 传址 .DLL命令 CreateToolhelp32Snapshot, 整数型, "kernel32.dll", "CreateToolhelp32Snapshot", 公开, 返回快照后的句柄 .参数 快照标志, 整数型, , 进程=15,线程=4,DLL=8,堆= .参数 进程标识符, 整数型, , lProcessID 欲照快照的进程标识符 .DLL命令 DuplicateHandle, 整数型, "kernel32", "DuplicateHandle", 公开, 复制对象句柄 .参数 hSourceProcessHandle, 整数型 .参数 hSourceHandle, 整数型 .参数 hTargetProcessHandle, 整数型 .参数 lpTargetHandle, 整数型, 传址 .参数 dwDesiredAccess, 整数型 .参数 bInheritHandle, 整数型 .参数 dwOptions, 整数型 .DLL命令 ExitProcess, 整数型, "kernel32.dll", "ExitProcess", 公开, , .参数 进程句柄, 整数型, , 填0即可 .DLL命令 FindWindow, 整数型, "user32.dll", "FindWindowA", 公开, FindWindow,寻找窗口列表第一个符合指定条件的顶级窗口 .参数 窗口类名, 文本型, , lpClassName,参见相关帮助,字符 (0) .参数 窗口文本, 文本型, , lpWindowName,参见相关帮助 .DLL命令 GetClassName, 整数型, "user32.dll", "GetClassNameA", 公开, 为指定的窗口取得类名 以字节数表示的类名长度;排除最后的空止字符。零表示出错。会设置GetLastError .参数 句柄, 整数型, , 欲获得类名的那个窗口的句柄 .参数 文本, 文本型, , 随同类名载入的缓冲区。预先至少必须分配nMaxCount+1个字符 .参数 文本长度, 整数型, , 由lpClassName提供的缓冲区长度; .DLL命令 GetCurrentProcess, 整数型, "kernel32.dll", "GetCurrentProcess", 公开 .DLL命令 GetCurrentProcessId, 整数型, "kernel32.dll", "GetCurrentProcessId", 公开 .DLL命令 GetExitCodeThread, 整数型, , "GetExitCodeThread", 公开, 取线程返回值 .参数 hThread, 整数型 .参数 lpExitCode, 整数型, 传址 .DLL命令 GetModuleHandleA, 整数型, "kernel32.dll", "GetModuleHandleA", 公开, , 获取一个应用程序或动态链接库的模块句柄 如执行成功成功,则返回模块句柄。零表示失败。会设置GetLastError .参数 lpModuleName, 文本型, , lpModuleName,指定模块名,这通常是与模块的文件名相同的一个名字。例如,NOTEPAD.EXE程序的模块文件名就叫作NOTEPAD .DLL命令 GetProcAddress, 整数型, "kernel32.dll", "GetProcAddress", 公开, , .参数 hModule, 整数型, , hModule .参数 lpProcName, 文本型, , lpProcName .DLL命令 GetThreadContext, 逻辑型, "kernel32", "GetThreadContext", 公开 .参数 hThreadId, 整数型 .参数 线程环境, context_ .DLL命令 GetThreadContext1, 逻辑型, "kernel32", "GetThreadContext", 公开 .参数 线程句柄, 整数型 .参数 寄存器, 寄存器 .DLL命令 GetWindow, 整数型, "user32", "GetWindow", 公开, 获得一个窗口的句柄,该窗口与某源窗口有特定的关系 由wCmd决定的一个窗口的句柄。如没有找到相符窗口,或者遇到错误,则返回零值。会设置GetLastError .参数 源窗口, 整数型, , 源窗口 .参数 关系, 整数型, , 指定结果窗口与源窗口的关系,它们建立在下述常数基础上:;GW_CHILD:寻找源窗口的第一个子窗口;GW_HWNDFIRST:为一个源子窗口寻找第一个兄弟(同级)窗口,或寻找第一个顶级窗口;GW_HWNDLAST:为一个源子窗口寻找最后一个兄弟(同级)窗口,或寻找最后一个顶级窗口;GW_HWNDNEXT:为源窗口寻找下一个兄弟窗口;GW_HWNDPREV:为源窗口寻找前一个兄弟窗口;GW_OWNER:寻找窗口的所有者; .DLL命令 GetWindowText, 整数型, "user32.dll", "GetWindowTextA", 公开, 取得一个窗体的标题(caption)文字,或者一个控件的内容(在vb里使用:使用vb窗体或控件的caption或text属性) 复制到lpString的字串长度;不包括空止字符。会设置GetLastError .参数 句柄, 整数型, , 欲获取文字的那个窗口的句柄 .参数 文本, 文本型, , 预定义的一个缓冲区,至少有cch+1个字符大小;随同窗口文字载入 .参数 文本长度, 整数型, , lp缓冲区的长度; .DLL命令 GetWindowTextLength, 整数型, "user32", "GetWindowTextLengthA", 公开, 调查窗口标题文字或控件内容的长短(在vb里使用:直接使用vb窗体或控件的caption或text属性) 字串长度,不包括空止字符 .参数 hwnd, 整数型, , 想调查文字长度的窗口的句柄; .DLL命令 GetWindowThreadProcessId, 整数型, "user32.dll", "GetWindowThreadProcessId", 公开, GetWindowThreadProcessId,获取与指定窗口关联在一起的一个线程和进程标识符 .参数 窗口句柄, 整数型, , hwnd,指定窗口句柄 .参数 进程标识符, 整数型, 传址, lpdwProcessId,指定一个变量,用于装载拥有那个窗口的一个进程的标识符 .DLL命令 KillTimer, 整数型, "user32.dll", "KillTimer", 公开 .参数 窗口句柄, 整数型, , hwnd .参数 事件标识符, 整数型, , nIDEvent .DLL命令 LoadLibraryA, 整数型, "kernel32.dll", "LoadLibraryA", 公开, , 载入指定的动态链接库,并将它映射到当前进程使用的地址空间 .参数 动态链接库名称, 文本型, , lpLibFileName,指定要载入的动态链接库的名称 .DLL命令 LookupPrivilegeValueA, 逻辑型, "advapi32.dll", "LookupPrivilegeValueA", 公开 .参数 lpSystemName, 文本型 .参数 lpName, 文本型 .参数 lpLuid, LuID, 传址 .DLL命令 Module32First, 整数型, "kernel32.dll", "Module32First", 公开 .参数 hSnapshot, 整数型, , hSnapshot .参数 模块进程结构, MODULEENTRY32, 传址 .DLL命令 Module32Next, 整数型, "kernel32.dll", "Module32Next", 公开 .参数 hSnapshot, 整数型, , hSnapshot .参数 模块进程结构, MODULEENTRY32, 传址 .DLL命令 OpenProcess, 整数型, "kernel32.dll", "OpenProcess", 公开, kernel32.dll .参数 访问级别, 整数型, , 2035711完全访问 .参数 子进程继承, 逻辑型, , 0为子进程继承 .参数 进程ID, 整数型, , 要打开的进程标识 .DLL命令 OpenProcessToken, 整数型, "advapi32.dll", "OpenProcessToken", 公开 .参数 ProcessHandle, 整数型 .参数 DesiredAccess, 整数型 .参数 TokenHandle, 整数型, 传址 .DLL命令 OpenThread, 整数型, "kernel32.dll", "OpenThread", 公开 .参数 dwDesiredAccess, 整数型 .参数 bInheritHandle, 逻辑型 .参数 dwThreadId, 整数型 .DLL命令 Process32First, 整数型, "kernel32.dll", "Process32First", 公开, 取进程快照第一个进程信息返回内存指针 .参数 快照句柄, 整数型 .参数 进程信息, 进程信息 .DLL命令 Process32Next, 整数型, "kernel32.dll", "Process32Next", 公开 .参数 快照句柄, 整数型 .参数 进程信息, 进程信息 .DLL命令 ReadProcessMemory, 整数型, "kernel32.dll", "ReadProcessMemory", 公开, 在进程读内存数据 地址1048576 .参数 进程句柄, 整数型, , 欲读取的进程句柄(可用OpenProcess函数得到) .参数 地址, 整数型, , 读取的起始地址 .参数 返回内容, 字节集, 传址, 返回的数据,其类型可设为整数、文本和字节集 .参数 长度, 整数型, , 一次读取的字节长度(读取的字节数4) .参数 实际长度, 整数型, 传址, 实际读取的字节长度 .DLL命令 RegOpenKeyExA, 整数型, , "RegOpenKeyExA", 公开, 打开注册表项 .参数 hKey, 整数型 .参数 lpSubKey, 文本型 .参数 ulOptions, 整数型 .参数 samDesired, 整数型 .参数 phkResult, 整数型, 传址 .DLL命令 ResumeThread, 整数型, "kernel32.dll", "ResumeThread", 公开, 开始暂停的线程 .参数 线程句柄, 整数型 .DLL命令 RtlMoveMemory, 整数型, , "RtlMoveMemory", 公开 .参数 lpvDest, 整数型, 传址 .参数 lpvSource, 整数型 .参数 cbCopy, 整数型 .DLL命令 SetThreadContext, 逻辑型, "kernel32", "SetThreadContext", 公开 .参数 hThreadId, 整数型 .参数 线程环境, context_ .DLL命令 SetThreadContext1, 逻辑型, "kernel32", "SetThreadContext", 公开 .参数 线程句柄, 整数型 .参数 寄存器, 寄存器 .DLL命令 SetTimer, 整数型, "user32.dll", "SetTimer", 公开 .参数 窗口句柄, 整数型, , hwnd .参数 事件标识符, 整数型, , nIDEvent .参数 时钟周期, 整数型, , uElapse .参数 回调函数地址, 整数型, , lpTimerFunc .DLL命令 SetWindowsHookEx, 整数型, "user32.dll", "SetWindowsHookExA", 公开 .参数 钩子类型, 整数型 .参数 处理函数入口, 整数型 .参数 函数所在模块, 整数型 .参数 目标线程ID, 整数型 .DLL命令 SHFileOperation, 整数型, "Shell32.dll", "SHFileOperationA", 公开 .参数 文件参数, SHFILEOPSTRUCT .DLL命令 SuspendThread, 整数型, , "SuspendThread", 公开 .参数 线程句柄, 整数型 .DLL命令 TerminateProcess, 整数型, "kernel32.dll", "TerminateProcess", 公开, 成功返回非零 .参数 进程句柄, 整数型 .参数 退出代码, 整数型, , 传入0 .DLL命令 TerminateThread, 逻辑型, "kernel32", "TerminateThread", 公开 .参数 hThread, 整数型 .参数 dwExitCode, 整数型 .DLL命令 Thread32First, 逻辑型, "kernel32.dll", "Thread32First", 公开 .参数 hSnapshot, 整数型 .参数 lpte, THREADENTRY32, 传址 .DLL命令 Thread32Next, 逻辑型, "kernel32.dll", "Thread32Next", 公开 .参数 hSnapshot, 整数型 .参数 lpte, THREADENTRY32, 传址 .DLL命令 VirtualAllocEx, 整数型, "kernel32.dll", "VirtualAllocEx", 公开, 成功返回分配内存的首地址,失败返回0 .参数 hProcess, 整数型, , 申请内存所在的进程句柄 .参数 lpAddress, 整数型, , 填0 .参数 dwSize, 整数型, , 欲分配的内存大小 .参数 flAllocationType, 整数型, , 填4096,MEM_COMMI .参数 flProtect, 整数型, , 填64,可读可写,可执行 .DLL命令 VirtualFreeEx, 整数型, "kernel32.dll", "VirtualFreeEx", 公开 .参数 hProcess, 整数型 .参数 lpAddress, 整数型 .参数 dwSize, 整数型, , 填0 .参数 dwFreeType, 整数型, , 填32768 .DLL命令 VirtualProtect, 整数型, "kernel32.dll", "VirtualProtect", 公开, 成功返回非0,失败返回0 .参数 起始地址, 整数型, , lpAddress .参数 长度, 整数型, , dwSize .参数 新保护权限, 整数型, , 可读写权限(PAGE_READWRITE)=4;PAGE_EXECUTE_READWRITE=64 .参数 旧保护权限, 整数型, 传址, 保存旧属性的结构变量地址 .DLL命令 VirtualProtectEx, 整数型, "kernel32.dll", "VirtualProtectEx", 公开, 成功返回非0,失败返回0 .参数 hprocess, 整数型, , 要修改内存的进程句柄 .参数 起始地址, 整数型, , lpAddress .参数 长度, 整数型, , dwSize .参数 新保护权限, 整数型, , 可读写权限(PAGE_READWRITE)=4 .参数 旧保护权限, 整数型, 传址, 保存旧属性的结构变量地址 .DLL命令 VirtualQueryEx, 整数型, "kernel32.dll", "VirtualQueryEx", 公开 .参数 hProcess, 整数型 .参数 lpAddress, 整数型 .参数 info, MEMORY_BASIC_INFORMATION, 传址 .参数 dwLength, 整数型 .DLL命令 VMProtectBegin, , "VMProtectSDK32.lib", "_VMProtectBegin@4", 公开, 功能:设置开始标记 .参数 MarkerName, 文本型, 传址, 标记名 .DLL命令 VMProtectBeginMutation, , "VMProtectSDK32.lib", "_VMProtectBeginMutation@4", 公开, 功能:设置[变异]标记 .参数 MarkerName, 文本型, 传址, 标记名 .DLL命令 VMProtectBeginUltra, , "VMProtectSDK32.lib", "_VMProtectBeginUltra@4", 公开, 功能:设置[虚拟+变异]标记 .参数 MarkerName, 文本型, 传址 .DLL命令 VMProtectBeginUltraLockByKey, , "VMProtectSDK32.lib", "_VMProtectBeginUltraLockByKey@4", 公开 .参数 MarkerName, 文本型, 传址, 标记名 .DLL命令 VMProtectBeginVirtualization, , "VMProtectSDK32.lib", "_VMProtectBeginVirtualization@4", 公开, 功能:设置[虚拟]标记 .参数 MarkerName, 文本型, 传址, 标记名 .DLL命令 VMProtectBeginVirtualizationLockByKey, , "VMProtectSDK32.lib", "_VMProtectBeginVirtualizationLockByKey@4", 公开 .参数 MarkerName, 文本型, 传址 .DLL命令 VMProtectDecryptStringA, 整数型, "VMProtectSDK32.lib", "_VMProtectDecryptStringA@4", 公开, 功能:加密Ansi字符串常量,返回加密后的字符串指针 .参数 char, 文本型, 传址, 提供Ansi字符串常量 .DLL命令 VMProtectDecryptStringW, 整数型, "VMProtectSDK32.lib", "_VMProtectDecryptStringW@4", 公开, 功能:加Unicode字符串,返回加密后的字符串指针 .参数 wchar_t, 文本型, 传址, 提供Unicode字符串常量 .DLL命令 VMProtectEnd, , "VMProtectSDK32.lib", "_VMProtectEnd@0", 公开, 功能:设置与虚拟/变异等功能配对的结束标记 .DLL命令 VMProtectIsDebuggerPresent, 逻辑型, "VMProtectSDK32.lib", "_VMProtectIsDebuggerPresent@4", 公开, 功能:检测调试器是否存在 .参数 CheckKernelMode, 逻辑型, , 是否检测KernelMode调试器.为假,则检测user-mode调试器,例如OllyDBG, WinDBG等..为真,则同时检测user-mode和KernelMode(包括SoftICE, Syser等...)调试器, .DLL命令 VMProtectIsValidImageCRC, 逻辑型, "VMProtectSDK32.lib", "_VMProtectIsValidImageCRC@0", 公开, 功能:检测程序内存没有没有被改变 .DLL命令 VMProtectIsVirtualMachinePresent, 逻辑型, "VMProtectSDK32.lib", "_VMProtectIsVirtualMachinePresent@0", 公开, 功能:检测程序是否运行在虚拟机,比如VMware, Virtual PC, VirtualBox, Sandboxie等... .DLL命令 WaitForSingleObject, 整数型, "kernel32.dll", "WaitForSingleObject", 公开 .参数 hHandle, 整数型 .参数 dwMilliseconds, 整数型, , 填-1 .DLL命令 WriteProcessMemory, 逻辑型, "kernel32.dll", "WriteProcessMemory", 公开 .参数 进程句柄, 整数型 .参数 开始写入进址, 整数型, , 内存地址 .参数 写入数值数据, 字节集, 传址, 数据指针 .参数 写入长度, 整数型, , 长度 .参数 实际写入长度, 整数型, , 实际写出长度0 .DLL命令 取文本指针, 整数型, "kernel32", "lstrcpyn", 公开, 感谢海洋老师的例程 .参数 变量, , 传址, 一定要传址 .参数 变量, , 传址, 一定要传址.重复一次,骗骗Windows:) .参数 保留, 整数型, , 0 .图片 SE_PROTECT_END, 公开, 置入代码 (#SE_PROTECT_END)'结束标记 .图片 SE_PROTECT_START, 公开, 置入代码 (#SE_PROTECT_START)'默认保护 .图片 SE_PROTECT_START_MUTATION, 公开, 置入代码 (#SE_PROTECT_START_MUTATION)'乱序变形 .图片 SE_PROTECT_START_ULTRA, 公开, 置入代码 (#SE_PROTECT_START_ULTRA)'乱序+虚拟 .图片 SE_PROTECT_START_VIRTUALIZATION, 公开, 置入代码 (#SE_PROTECT_START_VIRTUALIZATION)'虚拟 .图片 SE_UNPROTECT_END, 公开, 置入代码 (#SE_UNPROTECT_END)'屏蔽特定代码的乱序和混淆 .图片 SE_UNPROTECT_START, 公开, 置入代码 (#SE_UNPROTECT_START)'屏蔽特定代码的乱序和混淆 .图片 VMProtect_Begin, 公开, 置入代码 (#VMProtect_Begin) 'VMP保护开始标志 .图片 VMProtect_End, 公开, 置入代码 (#VMProtect_End) 'VMP保护结束标志

16,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧