From: Glenn L. <pe...@ne...> - 2004-03-16 21:37:59
|
On approximately 3/16/2004 11:50 AM, came the following characters from the keyboard of Laurent ROCHER: > Hi, > > >>So the set of #defines named PERLWIN32GUI_NEM_* are mostly to do with >>that bit field. The DEACTIVATE, ACTIVATE, TERMINATE, MINIMIZE, >>MAXIMIZE, and RESIZE seem to have two bits set... but no special >>consideration is given to that in the code, as far as I can tell. So if >>any of these are defined, it could cause all of the others to be looked >>up in the hash? As well as SCROLL, and one of the ones from MOUSEMOVE >>to CLICK? >> >>Does anyone have an explanation for this? > > > I don't know why too. > > For add NEM event, i think you have too place to change : > - ParseNEMEvent for parsing event > - NEM_WindowMsgLoop for handle event. > > I think we need to redefine PERLWIN32GUI_NEM event constant for handle more > event per control. > For sample, if we modify event constant like below, we can win some extra > bit (and event). > We can win more bit by create specific event constant for each control. > But, i think it's ok for now and we don't need to change all constant every > where. Yes, this approach would allow multiple controls to reuse the same bits for orthogonal items. That would be more efficient than the "bundling" I suggested. But I guess I'll bundle all the NotifyIcon ones, because otherwise I'd need 3 bits, and there are only 2 left. > Laurent > > GUI.h > > // Common Event (All control) > #define PERLWIN32GUI_NEM_MOUSEMOVE 0x00000001 > #define PERLWIN32GUI_NEM_MOUSEDOWN 0x00000002 > #define PERLWIN32GUI_NEM_MOUSEUP 0x00000004 > #define PERLWIN32GUI_NEM_KEYDOWN 0x00000008 > #define PERLWIN32GUI_NEM_KEYUP 0x00000010 > #define PERLWIN32GUI_NEM_TIMER 0x00000020 > #define PERLWIN32GUI_NEM_PAINT 0x00000040 > > // Generic control Event constant > #define PERLWIN32GUI_NEM_CONTROL1 0x80000000 > #define PERLWIN32GUI_NEM_CONTROL2 0x40000000 > #define PERLWIN32GUI_NEM_CONTROL3 0x20000000 > #define PERLWIN32GUI_NEM_CONTROL4 0x10000000 > #define PERLWIN32GUI_NEM_CONTROL5 0x08000000 > #define PERLWIN32GUI_NEM_CONTROL6 0x04000000 > #define PERLWIN32GUI_NEM_CONTROL7 0x02000000 > #define PERLWIN32GUI_NEM_CONTROL8 0x01000000 > #define PERLWIN32GUI_NEM_CONTROL9 0x00800000 > #define PERLWIN32GUI_NEM_CONTROL10 0x00400000 > #define PERLWIN32GUI_NEM_CONTROL11 0x00200000 > #define PERLWIN32GUI_NEM_CONTROL12 0x00100000 > #define PERLWIN32GUI_NEM_CONTROL13 0x00080000 > #define PERLWIN32GUI_NEM_CONTROL14 0x00040000 > #define PERLWIN32GUI_NEM_CONTROL15 0x00020000 > #define PERLWIN32GUI_NEM_CONTROL16 0x00010000 > #define PERLWIN32GUI_NEM_CONTROL17 0x00008000 > #define PERLWIN32GUI_NEM_CONTROL18 0x00004000 > #define PERLWIN32GUI_NEM_CONTROL19 0x00002000 > #define PERLWIN32GUI_NEM_CONTROL20 0x00001000 > > // Multiple control > #define PERLWIN32GUI_NEM_CLICK > PERLWIN32GUI_NEM_CONTROL20 > #define PERLWIN32GUI_NEM_DBLCLICK > PERLWIN32GUI_NEM_CONTROL19 > #define PERLWIN32GUI_NEM_GOTFOCUS > PERLWIN32GUI_NEM_CONTROL18 > #define PERLWIN32GUI_NEM_LOSTFOCUS > PERLWIN32GUI_NEM_CONTROL17 > #define PERLWIN32GUI_NEM_CHANGE > PERLWIN32GUI_NEM_CONTROL16 > #define PERLWIN32GUI_NEM_CHANGING > PERLWIN32GUI_NEM_CONTROL15 > // Common control ListView & Header & TreeView > #define PERLWIN32GUI_NEM_ITEMCLICK > PERLWIN32GUI_NEM_CONTROL14 > #define PERLWIN32GUI_NEM_NODECLICK > PERLWIN32GUI_NEM_CONTROL14 > > // Specific Window & Dialog > #define PERLWIN32GUI_NEM_DEACTIVATE > PERLWIN32GUI_NEM_CONTROL1 > #define PERLWIN32GUI_NEM_ACTIVATE > PERLWIN32GUI_NEM_CONTROL2 > #define PERLWIN32GUI_NEM_TERMINATE > PERLWIN32GUI_NEM_CONTROL3 > #define PERLWIN32GUI_NEM_MINIMIZE > PERLWIN32GUI_NEM_CONTROL4 > #define PERLWIN32GUI_NEM_MAXIMIZE > PERLWIN32GUI_NEM_CONTROL5 > #define PERLWIN32GUI_NEM_RESIZE > PERLWIN32GUI_NEM_CONTROL6 > #define PERLWIN32GUI_NEM_SCROLL > PERLWIN32GUI_NEM_CONTROL7 > // Specific ToolBar > #define PERLWIN32GUI_NEM_BUTTONCLICK > PERLWIN32GUI_NEM_CONTROL1 > // Specific ToolTip > #define PERLWIN32GUI_NEM_NEEDTEXT > PERLWIN32GUI_NEM_CONTROL1 > // Specific Rebar > #define PERLWIN32GUI_NEM_HEIGHTCHANGE > PERLWIN32GUI_NEM_CONTROL1 > // Specific Listview > #define PERLWIN32GUI_NEM_ITEMCHECK > PERLWIN32GUI_NEM_CONTROL1 > #define PERLWIN32GUI_NEM_COLUMNCLICK > PERLWIN32GUI_NEM_CONTROL2 > // Specific Treeview > #define PERLWIN32GUI_NEM_COLLAPSE > PERLWIN32GUI_NEM_CONTROL1 > #define PERLWIN32GUI_NEM_COLLAPSING > PERLWIN32GUI_NEM_CONTROL2 > #define PERLWIN32GUI_NEM_EXPAND > PERLWIN32GUI_NEM_CONTROL3 > #define PERLWIN32GUI_NEM_EXPANDING > PERLWIN32GUI_NEM_CONTROL4 > // Specific Rebar > #define PERLWIN32GUI_NEM_BEGINTRACK > PERLWIN32GUI_NEM_CONTROL1 > #define PERLWIN32GUI_NEM_ENDTRACK > PERLWIN32GUI_NEM_CONTROL2 > #define PERLWIN32GUI_NEM_TRACK > PERLWIN32GUI_NEM_CONTROL3 > #define PERLWIN32GUI_NEM_DIVIDERDBLCLICK > PERLWIN32GUI_NEM_CONTROL4 > #define PERLWIN32GUI_NEM_ITEMDBLCLICK > PERLWIN32GUI_NEM_CONTROL5 > > > > -- Glenn -- http://nevcal.com/ =========================== The best part about procrastination is that you are never bored, because you have all kinds of things that you should be doing. |