Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Using "ToolTips" in C...

Featured Replies

  • Moderator

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!

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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

  • Author
  • Moderator

>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.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author
  • Moderator

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!

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author
  • Moderator

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

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.