int (__cdecl * mouse)(PSI_CONTROL , S_32 x, S_32 y, _32 b); #define OnMouseCommon(name) \ __DefineRegistryMethodP(PSI_PRELOAD_PRIORITY,PSI_ROOT_REGISTRY,unused_name,WIDE("control"),name WIDE("/rtti"),WIDE("mouse"),int,(PSI_CONTROL,S_32,S_32,_32), __LINE__)
User event callback called when a mouse event happens over a control, unless the control has claimed the mouse, in which case the mouse may not be over the control. X and Y are signed coordinates, if OwnMouse is called, then mouse events outside of the control may be trapped. buttons is a combination of ButtonFlags. If there is no keyboard event, keys will also be given to mouse event as button MK_OBUTTON.
Registers under
/psi/control/<name>/rtti/mouse = (PSI_CONTROL,S_32,S_32,_32)@void@_@mouse
static int OnMouseCommon( TEXT("YourControlName") )( PSI_CONTROL control, S_32 x, S_32 y, _32 buttons ) { // if the control uses the mouse, it should return 1, else the mouse is passed through. return 0; }
Copyright (c) 2000+. All rights reserved.
|
What do you think about this topic? Send feedback!
|