Sign in to follow this  
n4gix

Using "ToolTips" in C...

Recommended Posts

I've figured out how to use HELPID's in C, but can't quite get a handle on using "ToolTips."MOUSE_BEGIN(esdg_cit_II_EHSI_mouse_rect,0,0,0)...............MOUSE_PARENT(0,65,10,44, HELPID_GAUGE_NAV_GPS_SWITCH)...............MOUSE_PARENT(0,169,11,41, HELPID_GAUGE_VOR1)...............MOUSE_PARENT(33,254,34,80, HELPID_GAUGE_HSI_OBS1)...............MOUSE_PARENT(214,258,34,80, HELPID_GAUGE_HEADING_BUG_ADJUST)...............MOUSE_PARENT(268,62,16,49, HELPID_GAUGE_HSI)...............MOUSE_PARENT_BEGIN(84,269,25,23)...............................MOUSE_TOOLTIP_TEXT_STRING ("HDG_SYNCH")...............MOUSE_PARENT_ENDMOUSE_CHILD_FUNCT(33,254,17,31,CURSOR_DOWNARROW,MOUSE_LEFTSINGLE | MOUSE_DOWN_REPEAT,mouse_cb0)etc.As you can see, I've tried to use MOUSE_PARENT_BEGIN & MOUSE_PARENT_END to "sandwich in" the MOUSE_TOOLTIP_TEXT_STRING, but without success, as the gauge will not compile.Obviously, I've used "." here merely to preserve the indentation... :)I'd really like to find the solution to this, as there are a number of 'popups' I need that have no "HELPID" equivalents!

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I haven't tried to compile it, but MOUSE_TOOLTIP..s have to be sandwiched in MOUSE_PARENT_BEGINs and MOUSE_PARENT_ENDs (more then one tooltip and MOUSE_CHILD_,.. possible even "sub"-MOUSE_PARENT...s) so that's correct. MOUSE_PARENT_BEGIN neeeds a fifths parameter (a help id) e.g.: MOUSE_PARENT_BEGIN(84,269,25,23,HELP_NONE)MOUSE_TTOLTIP_STRING_TEXT need a second parameter of the type MOUSE_ARG[], you can either use NULL or if it is defined the MOUSE_TOOLTIP_STRING macro e.g. MOUSE_TOOLTIP_STRING("HDG_SYNCH")If it is not defined (I inserted some in my gauges.h, but I can't recall which of them), define it with:#define MOUSE_TOOLTIP_STRING(STRING) MOUSE_TOOLTIP_TEXT_STRING_NARG ((STRING), NULL, 0)Arne Bartels

Share this post


Link to post
Share on other sites

>If it is not defined (I inserted some in my gauges.h, but I>can't recall which of them), define it with:>#define>MOUSE_TOOLTIP_STRING(STRING) MOUSE_TOOLTIP_TEXT_STRING_NARG>((STRING), NULL, 0)Thanks Arne. That macro is defined already in my gauges.h so I'm ok there. I'll give your suggestions a try.BTW, I posted the code I've tried for the Hobbs gauge. Unfortunately, it won't read the file, and when writing, it simply puts a 0 (zero) in the file.

Share this post


Link to post
Share on other sites

THANKS!Using your tips, I managed to get it working, although just a bit differently........,MOUSE_PARENT_BEGIN(84,269,25,23,HELP_NONE)..........MOUSE_TOOLTIP_STANDARD_STRING("COURSE-SYNCH")..... MOUSE_PARENT_END..... MOUSE_PARENT_BEGIN(170,275,25,17,HELP_NONE)..........MOUSE_TOOLTIP_STANDARD_STRING("HEADING-SYNCH")..... MOUSE_PARENT_ENDI added the #define you mentioned (although it is similar to one already there), but could not get it to work. However, MOUSE_TOOLTIP_STANDARD_STRING(STRING) works just fine! :)The real "key" though was the fifth parameter in the MOUSE_PARENT_BEGIN(x,y,w,h,HELP_NONE)... It seems MS left some critical information out of the SDK! :(Thanks again!

Share this post


Link to post
Share on other sites

MOUSE_BEGIN(esdg_cit_II_altimeter_mouse_rect,0,0,0)..........MOUSE_PARENT_BEGIN(4,158,27,15, HELP_NONE)....................MOUSE_TOOLTIP_ID(TOOLTIPTEXT_ALTIMETER_KOHLSMAN_INHG)..........MOUSE_PARENT_END..........MOUSE_PARENT_BEGIN(8,175,27,15, HELP_NONE)....................MOUSE_TOOLTIP_ID(TOOLTIPTEXT_ALTIMETER_KOHLSMAN_MBAR)..........MOUSE_PARENT_ENDMOUSE_CHILD_FUNCT(4,158,13,31,CURSOR_DOWNARROW,MOUSE_LEFTSINGLE | MOUSE_DOWN_REPEAT,mouse_cb0)MOUSE_CHILD_FUNCT(20,155,15,33,CURSOR_UPARROW,MOUSE_LEFTSINGLE | MOUSE_DOWN_REPEAT,mouse_cb1)MOUSE_END

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this