摘要: 1.安装勾子用SetWindowsHookEx function来实现,对于这个函数先来看MSDN解释 Installs an application-defined hook procedure into a hook chain. You would install a hook procedu 阅读全文
posted @ 2016-03-10 14:45 心燃 阅读(587) 评论(0) 推荐(0) 编辑
摘要: 首先要获得设备环境的句柄,可以通过GetDC函数来获得,对于这个函数,MSDN上是这样说明的 The GetDC function retrieves a handle to a device context (DC) for the client area of a specified windo 阅读全文
posted @ 2016-03-10 14:44 心燃 阅读(2726) 评论(0) 推荐(0) 编辑
摘要: 1.在窗启动时创建ATOM;(aatom:ATOM;定义在private中) 1 if FindAtom('ZWXhotKey')=0 then 2 begin 3 aatom:=GlobalAddAtom('ZWXhotKey'); 4 end; 5 if RegisterHotKey(Handl 阅读全文
posted @ 2016-03-10 14:43 心燃 阅读(1900) 评论(0) 推荐(0) 编辑
摘要: 对象的方法能定义成静态(static)、虚拟(virtual)、动态(dynamic)或消息处理(message)。请看下面 的例子: TFoo = class procedure IAmAStatic; procedure IAmAVirtual; virtual; procedure IAmAD 阅读全文
posted @ 2016-03-10 14:41 心燃 阅读(1678) 评论(0) 推荐(0) 编辑
摘要: 摘要:Windows编程和Dos编程,一个很大的区别就是,Windows编程是事件驱动,消息传递的。所以,要学好Windows编程,必须 对消息机制有一个清楚的认识,本文希望能够对消息的传递做一个全面的分析。 一、什么是消息? 消息系统对于一个win32程序来说十分重要,它是一个程序运行的动力源泉。 阅读全文
posted @ 2016-03-10 13:01 心燃 阅读(2393) 评论(0) 推荐(0) 编辑