anchor.diff:  
   const
     HelloWorldString: String = 'Hello, world!';
  +  ClickToClose: String = 'click to close';
   
   
   type
  
positive.code: begin
    fpgApplication.Initialize;
    MainWindow := TMainWindow.Create(nil);
    MainWindow.Show;
    fpgApplication.Run;
    MainWindow.Free;
  
negative.code:   DoSetWindowVisible(True);
    // We can't set a title if we don't have a window handle. So we do that here
    // and not in the constructor.
    SetWindowTitle('fpGUI Hello World');
  end;
  
  procedure TMainWindow.MsgPaint(var msg: TfpgMessageRec);
  var
    r: TfpgRect;
    i: Integer;
    fnt: TfpgFont;
  begin
    Canvas.BeginDraw;  // begin double buffering
  
    r.SetRect(0, 0, Width, Height);
    Canvas.GradientFill(r, clBlue, clBlack, gdVertical);
  
    fnt := fpgGetFont('Arial-20');
    try
      Canvas.Font := fnt;
  
      Canvas.SetTextColor(clBlack);
      Canvas.DrawString((Width - Canvas.Font.TextWidth(HelloWorldString)) div 2 + 1,
        (Height - Canvas.Font.Height) div 2 + 1, HelloWorldString);
  
      Canvas.SetTextColor(clWhite);
      Canvas.DrawString((Width - Canvas.Font.TextWidth(HelloWorldString)) div 2 - 1,
        (Height - Canvas.Font.Height) div 2 - 1, HelloWorldString);
    finally
      fnt.Free;
    end;
  
    fnt := fpgGetFont('Arial-10');
    try
      Canvas.Font := fnt;
      Canvas.DrawString((Width - Canvas.Font.TextWidth(ClickToClose)) div 2 - 1,
        Height - (Canvas.Font.Height*2), ClickToClose);
    finally
      fnt.Free;
    end;
  
    Canvas.EndDraw;
  end;
  