//声明:
CreatePatternBrush(
  Bitmap: HBITMAP {位图句柄}
): HBRUSH;        {返回画刷句柄}

//举例: procedure TForm1.FormPaint(Sender: TObject); var Bitmap: TBitmap; BrushHandle: HBRUSH; begin Bitmap := TBitmap.Create; Bitmap.LoadFromFile('c:\temp\bg.bmp'); BrushHandle := CreatePatternBrush(Bitmap.Handle); FillRect(Canvas.Handle, ClientRect, BrushHandle); DeleteObject(BrushHandle); end;
//效果图:

posted on 2008-02-10 15:37  万一  阅读(4321)  评论(2编辑  收藏  举报