F
ff_ff
Unregistered / Unconfirmed
GUEST, unregistred user!
property OnPaint: TNotifyEvent read FOnPaint write FOnPaint stored IsForm;
FOnPaint: TNotifyEvent;
procedure Paint
dynamic;
procedure TCustomForm.Paint;
begin
if Assigned(FOnPaint) then FOnPaint(Self);
end;
TNotifyEvent = procedure(Sender: TObject) of object;
procedure WMPaint(var Message: TWMPaint)
message WM_PAINT;
procedure TForm1.FormPaint(Sender: TObject);
begin
ShowMessage('重画');
end;
我把事件onpaint相关的VCL代码全帖出来,以此为例:
当用户改变窗口大小时,弹出'重画'对话框,可是:
FormPaint(Sender:TObject)如何知道响应OnPaint事件
FOnPaint: TNotifyEvent;
procedure Paint
dynamic;
procedure TCustomForm.Paint;
begin
if Assigned(FOnPaint) then FOnPaint(Self);
end;
TNotifyEvent = procedure(Sender: TObject) of object;
procedure WMPaint(var Message: TWMPaint)
message WM_PAINT;
procedure TForm1.FormPaint(Sender: TObject);
begin
ShowMessage('重画');
end;
我把事件onpaint相关的VCL代码全帖出来,以此为例:
当用户改变窗口大小时,弹出'重画'对话框,可是:
FormPaint(Sender:TObject)如何知道响应OnPaint事件