在Delphi中:1、Tapplication的OnMessage事件从Windows的消息队列中检测消息,然后判别处理
2、直接声明过程,如:procedure WMPaint(var Msg:TWMPaint);message WM_PAINT;在单元的implementation部分实现此过程
produre TForm1.WMPaint(var Msg:TWMPaint);
begin
.
.
.
end;
2、直接声明过程,如:procedure WMPaint(var Msg:TWMPaint);message WM_PAINT;在单元的implementation部分实现此过程
produre TForm1.WMPaint(var Msg:TWMPaint);
begin
.
.
.
end;
1.Application.OnMessage
2.窗体过程WndProc
3.自定义的消息处理过程(如果有的话)如WMMYMESSAGE() WMPaint()等
4.默认消息处理过程DefaultHandle可在上述过程以过滤消息.