Guten Tage
Ich habe ein procedure gefunden, wo man die Scrollposition (scrollbar Bewegung) mit WM VSCROLL abfangen kann.
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
| procedure TForm1.RichEdWndProc(var Msg: TMessage); begin Msg.Result := CallWindowProc(POldWndProc, RichEdit1.Handle, Msg.Msg, Msg.WParam, Msg.LParam);
if (Msg.Msg = WM_VSCROLL) then begin Label1.Caption := 'scrollbar move' + IntToStr(HIWORD(Msg.Wparam)); RichEdit1.SelStart := RichEdit1.Perform(EM_LINEINDEX, RichEdit1.Perform(EM_GETFIRSTVISIBLELINE, 0, 0), 0) + 1; end; end; |
Ich möchte ebenfalls in dieser procedure auch die Pfeiltaste up/ down (und Mouse wheel up/down) abfangen, z.b wie
Delphi-Quelltext
1:
| if (Msg.Msg = WM_Pfeil_Down ???? ) then ... |
Ist das möglich, wenn ja, würde ich sehr dankbar für ein kleines Beispiel.
Grüß und danke im voraus.