消息的接收  消息到是有了,但怎样才能让程序以及窗口接收到呢?还是从使用的角度考虑,可以想象到,对于一个程序或窗口可以接收到来自鼠标、键盘等输入设备的消息,也可以接收到来自程序传递的消息,因为有了前面的tagMSG结构,我们就可以被动的在程序中接收消息了。这个功能的实现就是由下面的程序实现的(同样的这段程序来自于delphi的元代码):function Tapplication . ProcessMessage ( var Msg : TMsg ) : Boolean;
var
 Handled : Boolean; 
begin
 Result : = False; 
 if PeekMessage ( Msg , 0 , 0 , 0 , PM_REMOVE ) then
 begin
  Result : = True; 
  if Msg.Message <> WM_QUIT then
  begin
   Handled := False; 
   if Assigned ( FonMessage ) then FonMessage ( Msg , Handled ) 
   if not IsHintMsg ( Msg ) and not Handled and not IsMDIMsg ( Msg ) and
   not IsKeyMsg ( Msg ) and not IsDlgMsg ( Msg ) then
   begin
    TranslateMessage ( Msg ); 
    DispatchMessage ( Msg ); 
   end; 
  end
 else
  FTerminate : = True; 
 end 
end 
请高手给讲解下吧!