richedit???怎么做?用CANVAS?可以画吗?
解决方案 »
- win98在indy 的udp 中无法接受数据
- 告诉大家一个学习Delphi的好网站!
- 一个程序设置了俩窗体 form1(主)form2(次),form1最小化,form2也最小化了,怎么让form2没反映?
- 有个数据愢选的问题要问兄弟们.
- asm文件属于什么文件类型
- 工具条按钮位置
- 今天我大寿,分5贴散分1000(3 of 5),请各位自觉莫重复接分!
- Interbase数据如何把它转换为ACCESS数据或SQL SERVER数据库!看一下我的一个方法!
- 救命呀!!那位兄弟用过Tcriticalsection临界资源安全对象?
- delphi使用mscomm32控件时,电脑打不开问题?
- sql语言中decode怎么用
- 帮忙,看我的瘦客户端差什么呀?
type
TMyMemo = class(TMemo)
protected
procedure WMPaint(var Message: TWMPaint); message WM_PAINT;
end;
procedure TMyMemo.WMPaint(var Message: TWMPaint);
var
MCanvas: TControlCanvas;
DrawBounds : TRect;
Begin
inherited;
MCanvas:=TControlCanvas.Create;
DrawBounds := ClientRect; // Work with temporary TRect record.
Try
MCanvas.Control:=Self;
With MCanvas do
Begin
Brush.Color := clBtnFace;
FrameRect( DrawBounds );
InflateRect( DrawBounds, -1, -1);
FrameRect( DrawBounds );
FillRect ( DrawBounds );
MoveTo ( 33, 0 );
Brush.Color := clWhite;
LineTo ( 33, ClientHeight );
PaintImages;//定义的画图片过程
end;
finally
MCanvas.Free;
End;
end;
procedure TMyMemo.PaintImages;
var
MCanvas: TControlCanvas;
DrawBounds : TRect;
i, j : Integer;
OriginalRegion : HRGN;
ControlDC : HDC;
begin
MCanvas:=TControlCanvas.Create;
DrawBounds := ClientRect; // Work with temporary TRect record.
try
MCanvas.Control:=Self;
ControlDC := GetDC ( Handle );
MCanvas.Draw(0, 1, Application.Icon);
finally
MCanvas.Free;
end;
end;