Autor Beitrag
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Di 07.06.05 16:33 
Hallo, ich habe die Komponentne THotkey und möchte damit einen Globalen Hotkey registieren, ich habe das jetzt so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
type
  TWMHotkey = record
    Msg: Cardinal;
    idHotKey: Word;
    Modifiers: Integer;
    VirtKey: Integer;
  end;

ausblenden Delphi-Quelltext
1:
procedure WMHotKey(var Msg: TWMHotKey); Message WM_HOTKEY;					

ausblenden Delphi-Quelltext
1:
2:
3:
  RegisterHotKey(MainForm.Handle, ID, 0, ord(hall.HotKey));
  RegisterHotKey(MainForm.Handle, ID + 1, 0, ord(hwin.HotKey));  
  RegisterHotKey(MainForm.Handle, ID + 2, 0, ord(hsearch.HotKey));

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TMainForm.WMHotKey(Var Msg: TWMHotkey);
begin
  if Msg.IdHotKey = ID then
{...}
end;

mein problem ist nun, wie kann ich modifikatoren benutzen, strg, alt, shift oder mehrere von denen auf einmal ? (THotkey + RegisterHotkey) und wie kann ich, wenn ich jetzt zb wenn ich ord(hall.Hotkey) in eine ini Datei speichere, das wieder als Hotkey laden, mit chr gehts nicht :!:

Vielen Dank schonmal

MFG
F34r0fTh3D4rk


EDIT: die Lösung steht ja hier:

www.swissdelphicente...showcode.php?id=2375

Aber laden und speichern bräuchte ich noch :?