//声明:
CreateHatchBrush(
  p1: Integer; {阴影样式}
  p2: COLORREF {颜色值}
): HBRUSH;     {返回画刷句柄}

//p1 参数可选值:
HS_HORIZONTAL = 0;
HS_VERTICAL   = 1; 
HS_FDIAGONAL  = 2; 
HS_BDIAGONAL  = 3; 
HS_CROSS      = 4; 
HS_DIAGCROSS  = 5; 

//举例: procedure TForm1.FormPaint(Sender: TObject); var BrushStyle: Integer; BrushHandle: HBRUSH; begin BrushStyle := RadioGroup1.ItemIndex; BrushHandle := CreateHatchBrush(BrushStyle, clRed); FillRect(Canvas.Handle, Rect(16,16,100,120), BrushHandle); DeleteObject(BrushHandle); end; procedure TForm1.RadioGroup1Click(Sender: TObject); begin Refresh; end;
//效果图:

posted on 2008-02-10 14:24  万一  阅读(3520)  评论(0编辑  收藏  举报