随笔 - 2146  文章 - 97 评论 - 11767 trackbacks - 253

//声明:
InflateRect(
  var lprc: TRect; {要修改的矩形}
  dx, dy: Integer  {变化值}
): BOOL;

//举例: procedure TForm1.FormPaint(Sender: TObject); var R: TRect; const s = '%d,%d,%d,%d'; begin R := Rect(60, 60, 200, 150); DrawFocusRect(Canvas.Handle, R); Canvas.TextOut(R.Left, R.Top-15, Format(s,[R.Left,R.Top,R.Right,R.Bottom])); InflateRect(R, 20, 20); DrawFocusRect(Canvas.Handle, R); Canvas.TextOut(R.Left, R.Top-15, Format(s,[R.Left,R.Top,R.Right,R.Bottom])); InflateRect(R, -40, -40); DrawFocusRect(Canvas.Handle, R); Canvas.TextOut(R.Left, R.Top-15, Format(s,[R.Left,R.Top,R.Right,R.Bottom])); end;
//效果图:

posted on 2008-02-10 09:55  万一  阅读(...)  评论(...编辑  收藏