Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi TShortCut, wie das Aufgebaut ? (https://www.delphipraxis.net/69356-tshortcut-wie-das-aufgebaut.html)

turboPASCAL 14. Mai 2006 10:57


TShortCut, wie das Aufgebaut ?
 
Hi,

Ich arbeite gerade mit Hotkeys. Da ich eine Komponente daraus machen mochte habe ich nun eine Frage,
wie kann ich feststellen welches Hotkey in TShortCut enthalten ist?

Ein HotKey zusammensetzen sieht so aus:
Delphi-Quellcode:
function THotKey.RegisterKey: boolean;
var
  Modifier: UINT;
  vKey: Word;
begin
  Modifier := 0;

  // TShortCut zu Modifier und Key umwandeln
  //... ?

  if fKeyModifiers = [kmALT] then
    Modifier := Modifier or MOD_ALT;

  if fKeyModifiers = [kmShift] then
    Modifier := Modifier or MOD_SHIFT;

  if fKeyModifiers = [kmCtrl] then
    Modifier := Modifier or MOD_CONTROL;

  vKey := GetKeyFromTable; // A..Z, 0..1, F1..F11 (Ohne F12 wegen Debugger)

  Result := RegisterHotKey(FWinControl.Handle, 0, Modifier, Cardinal(vKey));
end;

CalganX 14. Mai 2006 11:12

Re: TShortCut, wie das Aufgebaut ?
 
Hi Matti,
gucke dir mal die Funktion Delphi-Referenz durchsuchenShortCutToKey an.

Chris

turboPASCAL 14. Mai 2006 11:16

Re: TShortCut, wie das Aufgebaut ?
 
War 'ne dusseliche Frage, stimmts. THX. ;)


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:29 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz