//声明:
DrawCaption(
  p1: HWND;        {窗口句柄}
  p2: HDC;         {设备环境句柄}
  const p3: TRect; {矩形}
  p4: UINT         {选项}
): BOOL;

//p4 参数可选值:
DC_ACTIVE   = 1;     {使用活动标题栏颜色}
DC_SMALLCAP = 2;     {使用当前小标题栏字体}
DC_ICON     = 4;     {使用图标}
DC_TEXT     = 8;     {绘制标题}
DC_INBUTTON = $10;   {按下状态}
DC_GRADIENT = $20;   {使用渐变色}
DC_BUTTONS  = $1000; {}

//举例: procedure TForm1.FormPaint(Sender: TObject); begin DrawCaption( Handle, Canvas.Handle, Rect(16,40,288,60), DC_ACTIVE or DC_ICON or DC_TEXT or DC_GRADIENT ); end;
//效果图:

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