int (__cdecl * key)(PSI_CONTROL , _32); #define OnKeyCommon(name) \ __DefineRegistryMethodP(PSI_PRELOAD_PRIORITY,PSI_ROOT_REGISTRY,unused_name,WIDE("control"),name WIDE("/rtti"),WIDE("key"),int,(PSI_CONTROL,_32), __LINE__)
Controls may register a keyboard event procedure. This will receive notifications about what key is hit. Using mouse keys are impractical, because you would have to test every key for a new up/down status and figure out which key it was that went up and down and whether you should so something. A Simple test for like 'is this the space bar' might work as a mouse event processing MK_OBUTTON events.
Registers under
/psi/control/<name>/rtti/key=(PSI_CONTROL,_32)@int@_@key
This event may return TRUE if it uses the key or FALSE, and the key will be passed to the parent control to see if it wants to process it.
static int OnKeyCommon( name )( PSI_CONTROL control, _32 key ) { // a new key event has happened to this focused control. // the key passed may be parsed with macros from keybrd.h // that is, a key is a bit packed event described by keybrd.h }
Copyright (c) 2000+. All rights reserved.
|
What do you think about this topic? Send feedback!
|