在Delphi中:1、Tapplication的OnMessage事件从Windows的消息队列中检测消息,然后判别处理
2、直接声明过程,如:procedure WMPaint(var Msg:TWMPaint);message WM_PAINT;在单元的implementation部分实现此过程
produre TForm1.WMPaint(var Msg:TWMPaint);
begin
.
.
.
end;