Einzelnen Beitrag anzeigen

Benutzerbild von sakura
sakura

Registriert seit: 10. Jun 2002
Ort: München
11.412 Beiträge
 
Delphi 11 Alexandria
 
#4

Re: Problem mit GetKeyNameText

  Alt 11. Mai 2004, 08:24
Zwei grundlegende Probleme.
  • Du setzt die Funktion falsch ein.
  • Der erste Wert ist abhängig von der genutzten Tastatur und kann variieren

Vom ersten Wert interessieren die Bits 16 - 23, 24 und 25.

Der Wert der Bits 16 - 23 ist wie folgend
MS Help :: WM_KEYDOWN
16-23 Specifies the scan code. The value depends on the original equipment manufacturer (OEM).
24 Specifies whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0.


Und hier die Hilfe zu GetKeyNameText
MS Help :: GetKeyNameText
lParam

Specifies the second parameter of the keyboard message (such as WM_KEYDOWN) to be processed. The function interprets the following portions of lParam:

Bits Meaning
16-23 Scan code.
24 Extended-key flag. Distinguishes some keys on an enhanced keyboard.
25 "Don't care" bit. The application calling this function sets this bit to indicate that the function should not distinguish between left and right CTRL and SHIFT keys, for example.


Kurz, mit festen Werten zu arbeiten macht in keinem Fall Sinn

......
Daniel W.
Ich bin nicht zurück, ich tue nur so
  Mit Zitat antworten Zitat