anchor.diff:  procedure TfpgGDIApplication.DoWaitWindowMessage(atimeoutms: integer);
   var
     Msg: TMsg;
  -  timerid: longword;
  -  ltimerWnd: HWND;
     mp: boolean;
   begin
  -  timerid  := 0;
  -  if Assigned(wapplication.MainForm) then
  -    ltimerWnd := TfpgGDIWindow(wapplication.MainForm).WinHandle
  -  else
  -    ltimerWnd := 0;
  -
     if (atimeoutms >= 0) and (not MessagesPending) then
     begin
       if Assigned(FOnIdle) then
         OnIdle(self);
  -    if atimeoutms > 0 then
  -      timerid := Windows.SetTimer(ltimerWnd, 1, atimeoutms, nil)
  -    else
  -      Exit;  // handling waiting timeout
     end;
   
     {$IFDEF WinCE}
  
positive.code:   {$ENDIF}
  
    Windows.DispatchMessage(@msg);
  
    if timerid <> 0 then
      Windows.KillTimer(ltimerWnd, 1);  // same IDEvent as used in SetTimer
  end;
  
  procedure TfpgGDIApplication.DoFlush;
  
negative.code:   { TfpgGDITimer }
  
    TfpgGDITimer = class(TfpgBaseTimer)
    private
      FHandle: THandle;
    protected
      procedure   SetEnabled(const AValue: boolean); override;
    public
      constructor Create(AInterval: integer); override;
    end;
  
  
  