August 28, 200421 yr Since with this MACRO: #define MOUSE_CHILD_FUNCT(x, y, w, h, cursor, mouse_flags, function) {MOUSE_RECT_CHILD, {x, y, w, h}, cursor, helpid, mouse_flags, 0, function, NULL}, (which mysteriously omits helpid in the formal parameters)and this code: MOUSE_BEGIN( switch_strobe_mouse_rect, HELPID_GAUGE_LIGHT_SWITCH_STROBE, 0, 0 ) MOUSE_CHILD_FUNCT( 0, 0, 43, 73, CURSOR_UPARROW, MOUSE_LEFTSINGLE, switch_strobe_mcb)MOUSE_END You get this error: B206B3.Switch_Strobe.c(62) : error C2065: 'helpid' : undeclared identifier I'm thinking this redefinition of the MACRO fixes it: #define MOUSE_CHILD_FUNCT(x, y, w, h, cursor, mouse_flags, function, helpid) {MOUSE_RECT_CHILD, {x, y, w, h}, cursor, helpid, mouse_flags, 0, function, NULL}, by then using this code: MOUSE_BEGIN( switch_strobe_mouse_rect, HELPID_GAUGE_LIGHT_SWITCH_STROBE, 0, 0 ) MOUSE_CHILD_FUNCT( 0, 0, 43, 73, CURSOR_UPARROW, MOUSE_LEFTSINGLE, switch_strobe_mcb, HELPID_GAUGE_LIGHT_SWITCH_STROBE)MOUSE_END Comments?
August 28, 200421 yr The original version of that macro works for me without any problems.#define MOUSE_CHILD_FUNCT( x, y, w, h, cursor, mouse_flags, function ) {MOUSE_RECT_CHILD, {x, y, w, h}, cursor, HELP_NONE, mouse_flags, 0, function, NULL},
August 29, 200421 yr Try this:MOUSE_BEGIN(switch_strobe_mouse_rect,HELP_NONE, 0, 0 ) MOUSE_PARENT_BEGIN(0,0,43,73,HELPID_GAUGE_LIGHT_SWITCH_STROBE) MOUSE_CHILD_FUNCT(0,0,43,73,CURSOR_UPARROW, MOUSE_LEFTSINGLE, switch_strobe_mcb) MOUSE_PARENT_ENDMOUSE_END
Create an account or sign in to comment