VK_RIGHT,
VK_UP,
VK_DOWN, event is not respond¡£
so I set a message with KeyEvent;
Code: Select all
function OCXKeyEvent(var Message: TMessage):boolean;
var msg: TMsg;
begin
result := true;
case Message.Msg of
WM_GETDLGCODE: begin
Message.Result := DLGC_WANTTAB or DLGC_WANTARROWS;
end;
WM_CHAR: begin
if Message.WParam = 9 then
ActiveEditor.RichViewEdit.InsertTab;
//ActiveEditor.InsertTab;
end;
WM_KEYDOWN: begin
if Message.WParam in
[
VK_LEFT,
VK_RIGHT,
VK_UP,
VK_DOWN
]
then begin
SendMessage(GetFocus,WM_KEYDOWN,Message.WParam,-1);
end;
end
else
result := false;
end;
end;
VK_RIGHT,
VK_UP,
VK_DOWN, the cursor is not find or it not get Focused.
or Position the cursor on a table line¡£
In OCX it will be find.
In EXE it's ok.
[/code]