编辑器

优化代码树
This commit is contained in:
JianjunLiu
2023-03-27 14:03:35 +08:00
parent 0237f14153
commit ba333fba1f
3 changed files with 37 additions and 3 deletions
+1 -1
View File
@@ -433,7 +433,7 @@ type tcontrol = class(tcomponent)
begin
r := new TMMEASUREITEM(message,wparam,lparam,hwnd);
end else
if message in array(WM_KEYDOWN,WM_KEYUP,WM_CHAR,WM_SYSKEYDOWN,WM_SYSKEYUP)THEN
if message in array(WM_KEYDOWN,WM_KEYUP,WM_CHAR,WM_SYSCHAR,WM_SYSKEYDOWN,WM_SYSKEYUP)THEN
begin
r := new TMKEY(message,wparam,lparam,hwnd);
end else
+18
View File
@@ -47,6 +47,9 @@ type TWinControl = class(tcontrol)
FOnActivate;
FOnKeyDown;
FOnKeyPress;
fonsyskeydown;
fonsyskeyup;
FOnSysKeyPress;
FOnKeyUp;
factivecontrol;
autoref
@@ -1173,6 +1176,18 @@ type TWinControl = class(tcontrol)
CallMessgeFunction(FOnKeyUp,o,e);
keyup(o,e);
end
function WMSYSKEYUP(o,e):WM_SYSKEYUP;virtual;
begin
CallMessgeFunction(fonsyskeyup,o,e);
end
function WMSYSKEYDOWN(o,e):WM_SYSKEYDOWN;virtual;
begin
CallMessgeFunction(fonsyskeydown,o,e);
end
function WMSYSCHAR(o,e):WM_SYSCHAR;virtual;
begin
CallMessgeFunction(FOnSysKeyPress,o,e);
end
function WMCHAR(o,e):WM_CHAR;virtual;
begin
CallMessgeFunction(FOnKeyPress,o,e);
@@ -2574,8 +2589,11 @@ type TWinControl = class(tcontrol)
property OnActivate:eventhandler read FOnActivate write FOnActivate;
property OnClose:eventhandler read FOnClose write FOnClose;
property OnKeyDown:eventhandler read FOnKeyDown write FOnKeyDown;
property OnsysKeyDown:eventhandler read FOnsysKeyDown write FOnsysKeyDown;
property OnKeyUp:eventhandler read FOnKeyUp write FOnKeyUp;
property OnsysKeyUp:eventhandler read FOnsysKeyUp write FOnsysKeyUp;
property OnKeyPress:eventhandler read FOnKeyPress write FOnKeyPress;
property OnSysKeyPress:eventhandler read FOnSysKeyPress write FOnSysKeyPress;
property OnDesignClick read FOnDesinedsel write FOnDesinedsel;
property OnDesignDBLClick read FOnDesigDBLClick write FOnDesigDBLClick;
property OnDesignRClick read FOnDesinedRclick write FOnDesinedRclick;