VCL的类图结构 TObject | TPersisent | TComponent | TControl | ----------------
转载
2017-05-23 11:20:00
41阅读
TControl主要用来管理以下消息 鼠标消息显示隐藏刷新控件状态 ControlState/ControlStyle (待续,需要详细分析)位置标题移动 Touch/Hint/Help/Drag/Action/WindowText/AutoSize/Dock,颜色字体可见对齐 Color/Font
转载
2020-11-26 17:21:00
49阅读
2评论
-------------------------- TControl主要用来管理以下消息 --------------------------鼠标消息显示隐藏刷新控件状态 ControlState/ControlStyle (待续,需要详细分析)位置标题移动 Touch/Hint/Help/Dra... Read More
转载
2014-09-02 18:57:00
67阅读
2评论
Delphi XE2 之 FireMonkey 入门(37) - 控件基础: TControl 概览
{ TControl }
public
constructor Create(...); override; //
destructor Destroy; override;
原创
2021-04-30 10:53:24
272阅读
手工找出来,对比一下,有助于VCL框架的理解。-------------------------------------------------------------------------------------------- 才注意到,所有消息处理函数都是私有的,为什么呢?问题:其子类会继承它 Read More
转载
2014-12-09 17:33:00
63阅读
2评论
这是取得DC句柄的其中一种方法(会重定义原点和建立新的剪裁区): function TControl.GetDeviceContext(var WindowHandle: HWnd): HDC; begin if Parent = nil then raise EInvalidOperation.C Read More
转载
2016-02-26 20:40:00
90阅读
2评论
意外注意到这个小细节: procedure TControl.WMLButtonUp(var Message: TWMLButtonUp); begin inherited; // 注意,如果是直接点击Form1,会执行TCustomForm.DefaultHandler(var Message); Read More
转载
2015-08-25 20:41:00
69阅读
2评论
转载
2016-03-30 22:25:00
68阅读
2评论
// 9个显示函数 procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); virtual; // 虚函数,important 根据父控件 // 手法:固定不变的模式,或者简单调用,或者简单设置标志位,就不是虚函数。 ... Read More
转载
2015-08-25 19:42:00
48阅读
2评论
三、TControl FireMonkey重写了TControl的代码,实现了众多接口,如下图: 基类上实现了众多功能,这里不详细描述。 四、TEdit 编辑框是从TControl—TStyledControl继承下来的,并实现了众多接口,如下图: 从实现的接口可以看到,包括键盘、光标、文字处理等都
原创
2021-08-30 11:10:30
190阅读
Delphi XE2 之 FireMonkey 入门(7) - TText 与 TFont
TText 也是从 TShape(TControl -> TShape)继承;
而与之类似的 TLabel 的继承序列是 TControl -> TStyledControl -> TText
原创
2021-04-30 10:54:30
320阅读
Delphi--TControl与Windows消息的封装procedure TControl.WndProc(var Message: TMessage);
var
Form: TCustomForm;
begin
//由拥有control的窗体来处理设计期间的消息
if (csDesigning in ComponentState) then
begin
Form := GetParentFo
转载
2024-02-25 14:51:25
170阅读
unit untFixForm;interfaceuses Classes, SysUtils, Controls, Forms;type TFontedControl = class(TControl) public property F
转载
2023-08-31 10:59:18
67阅读
新发现一个函数(尽管不起作用): TWinControl用来处理鼠标和实际重绘,而处理鼠标全部在TControl里。此外还申请句柄,处理自己绘图,与父类的交互。虽然TControl也有绘图,但最后还是要让父类TWinControl来画。 贴一下TWinControl的几个关键的自绘代码: TWinC Read More
转载
2013-08-06 05:15:00
111阅读
2评论
代码如下: 虽然函数本身有返回值,但是一般情况下,不使用函数的返回值,而是把返回值记录在消息结构体里面,举例: 但是也有一些情况直接使用Perform函数的返回值,在Controls.pas单元里所有直接使用函数返回值的情况都摘录在这里了: 这还不算,还得看看那些记录在消息结构体里的返回值是被如何使 Read More
转载
2016-03-22 03:33:00
59阅读
2评论
procedure TFrmStyleProp.btnNewClick(Sender: TObject); var iniFile : TIniFile; idx : integer; ctrl : TControl;begin //格局还原 iniFile := TIniFile.Create(C
转载
2018-04-13 16:50:00
222阅读
2评论
//截取屏幕图片 function MakeScaleScreenshot(Sender: TControl): TBitmap; function GetScreenScale: Single; var ScreenService: IFMXScreenService; begin Result := 1; if TPlatformServices.Curr...
转载
2019-07-05 11:51:00
320阅读
2评论
procedure TControl.DoMatrixChanged(Sender: TObject);var TranslateMatrix, ScaleMatrix, RotMatrix: TMatrix; M1, M2: TMatrix;begin if (not FInPaintTo) an
转载
2018-12-05 09:31:00
73阅读
2评论
1.格局还原procedure TFrmStyleProp.btnNewClick(Sender: TObject); //声明var iniFile : TIniFile; idx : integer; ctrl : TControl;begin //格局还原 iniFile := TIniFil
转载
2018-04-16 14:39:00
230阅读
2评论
procedure ShadeIt(f: TForm; c: TControl; Width: Integer; Color: TColor); var rect: TRect; old: TColor; begin if (c.Visible) then begin rect := c.Bound
转载
2019-09-03 16:11:00
359阅读
2评论