肯定不是delphi的bug,把代码贴出来看看
解决方案 »
- 请教:如何向CXgrid中手工添加数据?
- 请高手指点
- 请教各位大侠,已知DBGrid.options是枚举类型,请问如何读取里面的值?
- 不斷顯示登錄框。
- 怎么最大化一个用ShellExecute打开但是最小化的Word文档???
- 求助:插入TimeStamp类型的字段数据,该如何写SQL语句? 在线等待
- skinengine的问题
- DELPHI编程的程序,应该用什么软件做安装最好?
- 急,怎样在存取dbgrid中的数据,请朋友指点。
- 怎样用数据库来管理WORD文档?
- 怎么辨别EOleException异常的类型?who can help me!!!!!!!
- "Table does not support this operation because it is not uniquely indexed.”为什么会报这样的错,如何解决呢?急呀!
对,把代码给大家分析分析,不一定是bug!!
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;type
TForm1 = class(TForm)
procedure FormPaint(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.DFM}procedure TForm1.FormPaint(Sender: TObject);
var c:tcanvas;
begin
c:=tcanvas.Create;
try
c.Handle:=getwindowDC(form1.Handle);
c.Pen.Width:=17;
c.Pen.Color:=clblue;
c.Rectangle(clientwidth div 2,12,clientwidth div 2+25,13);
c.TextOut(clientwidth div 2-5,7,'hanson');
finally
c.Free;
end;end;
end.
窗口缩小时, Windows先发送WM_Paint,再发送WM_NCPAINT,后面画的把前面盖掉了。
其它时候先发送WM_NCPAINT后发送WM_PAINT