D
dyzw
Unregistered / Unconfirmed
GUEST, unregistred user!
自己写了一个类 TMyScrollBox = Class(TScrollBox)
实现的时候想调用FControlState这个变量,怎么试都不行,请高手指点!
代码如下:
TMyScrollBox = Class(TScrollBox)
private
procedure OnResizeA(Sender: TObject);
procedure WMPaint(var Message: TWMPaint);
message WM_PAINT;
protected
procedure PaintWindow(DC: HDC);
override;
public
constructor Create(Owner: TComponent);
override;
destructor Destroy;
override;
end;
。。。。。。
procedure TMyScrollBox.WMPaint(var Message: TWMPaint);
begin
Include(Self.FControlState, csCustomPaint);
PaintHandler(Message);
end;
实现的时候想调用FControlState这个变量,怎么试都不行,请高手指点!
代码如下:
TMyScrollBox = Class(TScrollBox)
private
procedure OnResizeA(Sender: TObject);
procedure WMPaint(var Message: TWMPaint);
message WM_PAINT;
protected
procedure PaintWindow(DC: HDC);
override;
public
constructor Create(Owner: TComponent);
override;
destructor Destroy;
override;
end;
。。。。。。
procedure TMyScrollBox.WMPaint(var Message: TWMPaint);
begin
Include(Self.FControlState, csCustomPaint);
PaintHandler(Message);
end;