Forum: Win32/Win64 API (native code)
by Photoner,
17. Jun 2015
MOD_ALT or MOD_CONTROL or MOD_SHIFT
if (aString = 'CTRL-ALT') or (aString = 'ALT-CTRL') then result := MOD_CONTROL or MOD_ALT;
Forum: Win32/Win64 API (native code)
by Photoner,
17. Jun 2015
ach ja. habe folgendes eingefügt:
procedure SetHotKey(aKey1, aKey2 : cardinal; aNumber : integer);
begin
Form1.Memo1.Lines.Add(pchar('HotKey.' + IntToStr(aNumber)) + ' ---> ' + Form1.HotKeyList.HotKeyName);
Form1.HotKeyList.HotKey := GlobalAddAtom(pchar('HotKey.' + IntToStr(aNumber)));
if RegisterHotKey(Form1.Handle, form1.HotKeyList.HotKey ,aKey1, aKey2) then...
Forum: Win32/Win64 API (native code)
by Photoner,
17. Jun 2015
Key1 muss zwingend
CTRL
ALT
etc.
leer
sein. dann gehts:
Forum: Win32/Win64 API (native code)
by Photoner,
17. Jun 2015
GetLastError liefert mir für alle Hotkeys außer den ersten:
Fehler: 1004
"ERROR_INVALID_FLAGS
1004 (0x3EC)
Invalid flags."
Forum: Win32/Win64 API (native code)
by Photoner,
17. Jun 2015
Einen kleinen Fehler habe ich schon mal gefunden:
HotKeyListSize := i;
setlength(HotKeyList, i);
Ok, stimmte doch