它有一个 MaskEdit 属性(注意,属性) 打开后有一个 Input Mask 编辑框 格式符意义 L 允许输入英文字母,且一定要输入 l 允许输入英文字母,不一定要输入 A 允许输入英文字母和阿拉伯数字,一定要输入 a 允许输入英文字母和阿拉伯数字,不一定要输入 C 允许输入任何字符,一定要输 Read More
posted @ 2017-01-24 23:57
findumars
Views(1122)
Comments(0)
Diggs(0)
Delphi中标准控件是不支持png图片的,据说从Window2000后增加gdiplus.dll库处理更多的gdi图像,其中包括png。 关键的几个api GdipCreateBitmapFromFile(),从文件载入图像(不单只Bitmap) GdipCreateBitmapFromStrea Read More
posted @ 2017-01-24 23:46
findumars
Views(2844)
Comments(0)
Diggs(0)
现象:MainMenu设置Images属性后,看不到快捷按键的下划线,如:新建(&N) 分析:VCL中Menus.pas单元的代码,看到如下语句procedure TMenuItem.AdvancedDrawItem(ACanvas: TCanvas; ARect: TRect; State: TO Read More
posted @ 2017-01-24 23:29
findumars
Views(605)
Comments(0)
Diggs(0)
http://blog.csdn.net/zswang/article/details/1214827 Read More
posted @ 2017-01-24 23:28
findumars
Views(291)
Comments(0)
Diggs(0)
http://download.csdn.net/detail/zswang/207199 Read More
posted @ 2017-01-24 23:18
findumars
Views(411)
Comments(0)
Diggs(0)
Controls.pas单元中有一个FindControl函数,通过句柄获得对应的TWinControl对象。 function FindControl(Handle: HWnd): TWinControl;begin Result := nil; if (Handle <> 0) then beg Read More
posted @ 2017-01-24 23:14
findumars
Views(759)
Comments(0)
Diggs(0)
http://blog.csdn.net/zswang/article/details/111607 Read More
posted @ 2017-01-24 23:13
findumars
Views(868)
Comments(0)
Diggs(0)
http://blog.csdn.net/zswang/article/details/297038 Read More
posted @ 2017-01-24 23:13
findumars
Views(597)
Comments(0)
Diggs(0)
https://msdn.microsoft.com/en-us/library/windows/desktop/ms632599(v=vs.85).aspx#owned_windows https://msdn.microsoft.com/en-us/library/windows/desktop Read More
posted @ 2017-01-24 23:12
findumars
Views(326)
Comments(0)
Diggs(0)
type TMainWindow = packed record ProcessID: THandle; MainWindow: THandle; end; PMainWindow =^ TMainWindow; function IsMainWindow(AHandle: THandle): Bo Read More
posted @ 2017-01-24 23:11
findumars
Views(2569)
Comments(0)
Diggs(0)
转自:http://blog.sina.com.cn/s/blog_53d1e9210100uke4.html 目录 ⊙ RTTI 简介⊙ 类(class) 和 VMT 的关系⊙ 类(class)、类的类(class of class)、类变量(class variable) 的关系⊙ TObjec Read More
posted @ 2017-01-24 23:07
findumars
Views(1471)
Comments(0)
Diggs(0)
建议先参考我上次写的博文跨进程获取Richedit中Text: 获得QQ聊天输入框中的内容 拿到这个问题,我习惯性地会从VCL内核开始分析。找到TRichEdit声明的单元,分析TRichEdit保存为RTF流的代码。(分析VCL内核代码方便了解Windows标准API的封装和使用) 打开声明TRi Read More
posted @ 2017-01-24 22:59
findumars
Views(799)
Comments(0)
Diggs(0)
using System.Runtime.InteropServices;[DllImport("User32.DLL")]public static extern int SendMessage(IntPtr hWnd, uint Msg, int wParam, int lParam);publ Read More
posted @ 2017-01-24 22:56
findumars
Views(2338)
Comments(0)
Diggs(0)
(*冰刃这个系统分析工具以前还没用过。这样高级的工具,用结束进程的方式就不试了。按手工关闭的流程实现。首先是通过遍历当前进程,确定冰刃进程的主窗体;然后发送WM_CLOSE关闭主窗体。当关闭对话框出现的时候,最后就是模拟点击确定按钮。具体实现的时候要注意亮点:1、不能使用SendMessage发送W Read More
posted @ 2017-01-24 22:55
findumars
Views(391)
Comments(0)
Diggs(0)
关于头文件和源文件的分别 首先,我们可以将所有东西都放在一个.cpp文件内. 然后编译器就将这个.cpp编译成.obj,obj是什么东西? 就是编译单元了.一个程序,可以由一个编译单元组成, 也可以有多个编译单元组成. 如果你不想让你的源代码变得很难阅读的话, 就请使用多个编译单元吧.(一个函数不能 Read More
posted @ 2017-01-24 22:38
findumars
Views(882)
Comments(0)
Diggs(1)
http://blog.csdn.net/zswang/article/details/1214857 Read More
posted @ 2017-01-24 22:35
findumars
Views(1943)
Comments(0)
Diggs(0)
using System.Runtime.InteropServices; using System.Diagnostics; [DllImport("User32.DLL")] public static extern int SendMessage(IntPtr hWnd, uint Msg, Read More
posted @ 2017-01-24 22:32
findumars
Views(2492)
Comments(0)
Diggs(0)
private void button1_Click(object sender, EventArgs e) { char[] ch = { 'z', 's', 'w', 'a', 'n', 'g', '路', '过' }; String s1 = new String(ch); Read More
posted @ 2017-01-24 22:31
findumars
Views(704)
Comments(0)
Diggs(0)
procedure TForm1.RichEdit1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var vPoint: TPoint; begin if Button <> Read More
posted @ 2017-01-24 22:30
findumars
Views(1171)
Comments(0)
Diggs(0)
// 现象描述:// 用户点击按钮后程序开始繁忙工作,这时候用户不知道是否成功,就继续点几次// 采用Enalbe = false ... = true的方式发现还会触发点击,分析原因如下// 当程序繁忙的时候消息被堵住了// 所以点击消息还会被处理// 将队列里的消息处理掉后才打开按钮的Enabl Read More
posted @ 2017-01-24 22:28
findumars
Views(400)
Comments(0)
Diggs(0)
using System.Runtime.InteropServices; [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct USER_INFO_0 { public string Usern Read More
posted @ 2017-01-24 22:27
findumars
Views(1332)
Comments(0)
Diggs(0)
using System.Runtime.InteropServices; [DllImport("user32.dll")] public static extern IntPtr WindowFromDC(IntPtr hDC); private void button1_Click(objec Read More
posted @ 2017-01-24 22:25
findumars
Views(246)
Comments(0)
Diggs(0)
var vXMLDocument: TXMLDocument;begin vXMLDocument := TXMLDocument.Create('c:/temp/temp.xml'); Caption := IntToStr(vXMLDocument.Node.ChildNodes.Count); Read More
posted @ 2017-01-24 22:24
findumars
Views(1168)
Comments(0)
Diggs(0)
// Delphi procedure GetSqlData(ASource: PChar; ADest: PChar; ADestSize: Integer); stdcall; var S: string; begin if ASource = nil then Exit; S := Forma Read More
posted @ 2017-01-24 22:22
findumars
Views(2164)
Comments(0)
Diggs(0)
type TMenuHintWindow = class(THintWindow) private FTimerShow: TTimer; FTimerHide: TTimer; procedure TimerShowTimer(Sender: TObject); procedure TimerHi Read More
posted @ 2017-01-24 22:21
findumars
Views(740)
Comments(0)
Diggs(0)
//项目中添加Micrsoft.mshtml引用 --c:/temp/temp.htm-- <html> <script language="JavaScript"> var Temp = "Zswang 路过 :)"; </script> </html> using mshtml; private Read More
posted @ 2017-01-24 22:18
findumars
Views(782)
Comments(0)
Diggs(0)
function CompareStream(// 比较两个流是否相等 mStream1, mStream2: TStream // 两个流 ): Boolean;// 返回两个流是否相等 var vBuffer1, vBuffer2: array[0..$1000-1] of Char; vLen Read More
posted @ 2017-01-24 22:17
findumars
Views(1595)
Comments(0)
Diggs(0)
控制WebBrowser实际上就是控制IE,最简单的方法就是执行javascript或vbscript,省去了接口的转换。如何执行脚本?以前我一直用mshtml中IHTMLWindow2接口的execScript()方法,在Delphi中需要uses MSHTML单元: uses MSHTML; p Read More
posted @ 2017-01-24 22:16
findumars
Views(2364)
Comments(0)
Diggs(0)
private void Form1_Paint(object sender, PaintEventArgs e){ Text = e.ClipRectangle.Width.ToString();} 在窗体的Paint事件中,有一个ClipRectangle的属性,解释为“获取要在其中进行绘画的矩 Read More
posted @ 2017-01-24 22:12
findumars
Views(1537)
Comments(0)
Diggs(0)
Delphi中用MessageBox()API函数做倒计时对话框(使用Hook安装CBTHookCallback,计时器更改文字,SetWindowText API真正修改文字,引用未知函数)good
API有隐藏的MessageBoxTimeOut函数可以做计时对话框,缺点是不能显示还剩下多少秒关闭。 const IDTIMEDOUT = 32000; function MessageBoxTimeOut(hWnd: HWND; lpText: PChar; lpCaption: PChar; Read More
posted @ 2017-01-24 21:49
findumars
Views(1520)
Comments(0)
Diggs(0)
今天有人问我:“用shell打开文件(显示桌面.scf)的方式还是用模拟键盘(Win+D)显示桌面”这应该有更好的方法,就搜了搜,关键字定位“ToggleDesktop”因为显示桌面.scf的内容是:[Shell]Command=2IconFile=explorer.exe,3[Taskbar]Co Read More
posted @ 2017-01-24 21:43
findumars
Views(1557)
Comments(1)
Diggs(0)
最近在Mac OS X Mountain Lion下用Xcode进行开发,发现在编译选项里有如下所示的这两种编译器:一个是Apple LLVM compiler 4.2,另外一个是LLVM GCC 4.2。 近几年一直听人说LLVM比GCC好,但是我一直没有时间研究这二者的差别。由此问题出发,我又给 Read More
posted @ 2017-01-24 21:21
findumars
Views(1490)
Comments(0)
Diggs(0)
一.新建一个应用程序:File->New Applicaton 在Interface部分要放在Uses Message之后,定义一个消息常量:const WM_NID=WM_USER+1000; 系统规定从WM_USER开始为用户自定义消息。 二.定义一个全局变量: NotifyIcon:TNoti Read More
posted @ 2017-01-24 18:56
findumars
Views(1021)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号