delphi学习杂记

时间:2012-08-08 07:50:13
【文件属性】:

文件名称:delphi学习杂记

文件大小:42KB

文件格式:TXT

更新时间:2012-08-08 07:50:13

delphi

一些Delphi常用的代码及问题展示` 如: //为控件加边框 procedure WMNCPaint(var Msg: TWMNCPaint); message WM_NCPAINT; procedure TForm1.WMNCPaint(var Msg: TWMNCPaint); var dc: hDC; Pen: hPen; OldPen: hPen; OldBrush: hBrush; begin inherited; dc := GetWindowDC(Handle); msg.Result := 1; Pen := CreatePen(PS_SOLID, 1, RGB(255, 0, 0)); OldPen := SelectObject(dc, Pen); OldBrush := SelectObject(dc, GetStockObject(NULL_BRUSH)); Rectangle(dc, 0, 0, Self.Width, Self.Height); SelectObject(dc, OldBrush); SelectObject(dc, OldPen); DeleteObject(Pen); ReleaseDC(Handle, Canvas.Handle); end;


网友评论