在无窗口程序中自定义消息,该怎么解决

在无窗口程序中自定义消息
program TIMER;

uses
  ExtCtrls, windows, Messages,
  classes;

Type
  TMyTimer = class (TTimer) //继承TIMER类,增加类方法给ONTIMER事件用
  private
  procedure IONTimer(Sender: TObject);
  end;

const
  WM_MYCLOSE = WM_USER+1111 ; //自定义消息

var
  Timer: TMyTimer;
  AMessage: TMsg;

{$R *.res}

procedure TMyTimer.IONTimer(Sender: TObject);
begin
  SELF.ENABLED:= FALSE;
  messagebox(0,'无窗口程序运行中','通知',MB_OK);
  halt; //<-------------------------------------此处因为直接使用HALT不安全,想在这里发个自定义退消息,
end; //以便回到消息循环中得到消息后再退出.

begin //主函数
  Timer:= TMyTimer.Create(nil);
  Timer.Interval:= 2000;
  Timer.OnTimer:= Timer.IONTimer;
  Timer.Enabled:= true;
  while GetMessage(aMessage,0,0,0) do //消息循环
  begin
  TranslateMessage(amessage);
  DispatchMessage(aMessage);
  end;
  Timer.Enabled:= false;
  Timer.Free;
  Halt(1);
END.

请问高手如何在这里发消息给自己啊?不知道怎么取得这个程序的句柄(取TIMER的句柄?)...或者是增加一个句柄...

------解决方案--------------------
while(GetMessage(Msg,Handle,0,0))do
begin
end;
------解决方案--------------------
可以先在单元中添加一个fHandle: Integer 的句柄
利用Classes.AllocateHWnd(WndProc);给这个句柄赋值,
然后用一个procedure WndProc(var mess: TMessage);之类的消息处理函数来处理发给这个句柄的消息