Sign in to follow this  
mgh

SDK FLIGHTMAP

Recommended Posts

When compling this gauge fromn the SDK, I get a compile time error "Undefined symbol 'helpid'" in the line that expands the MOUSE_CHILD_FUNCT:MOUSE_CHILD_FUNCT (MAP_LEFT_BORDER, MAP_TOP_BORDER, 230, 259, CURSOR_HAND, MOUSE_LEFTSINGLE, AddNewWaypoint)I think this may be because of the line but one preceding it:MOUSE_BEGIN( flightmap_rect, HELP_NONE, 0, 0 )HELP_NONE is the Help_ID of the ToolTip text to display but I can't find it in the HelpID document. What should be used there when a ToolTip isn't wanted? 0 and NULL still give the error.EDITI've now found HELP_NONE is defined as 0 in gauges.h!

Share this post


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

Have you modified the .c in any way? This is from my working sample gauge:MOUSE_TOOLTIP_ARGS (GPS_Args) MOUSE_TOOLTIP_ARG (MODULE_VAR_NONE, 0, NULL, NULL, NULL, GPSARG_Get_GroundSpeed, NULL, NULL) MOUSE_TOOLTIP_ARG (MODULE_VAR_NONE, 0, NULL, NULL, NULL, GPSARG_Get_Track, NULL, NULL) MOUSE_TOOLTIP_ARG (MODULE_VAR_NONE, 0, NULL, NULL, NULL, NULL, NULL, GPSARG_Get_WP_ID) MOUSE_TOOLTIP_ARG (MODULE_VAR_NONE, 0, NULL, NULL, NULL, GPSARG_Get_WP_Distance, NULL, NULL)MOUSE_TOOLTIP_ARGS_ENDMOUSE_BEGIN( flightmap_rect, HELP_NONE, 0, 0 ) MOUSE_TOOLTIP_TEXT_STRING ("Ground Speed: %1!d! knots, Track: %2!d!

Share this post


Link to post
Share on other sites

My C code agrees with yours. I'm using Borland C++Builder4 Professional. The only changes I made to SDK.FlightMap.c were to change 3 linesgpsinfo = var.var_ptr;to gpsinfo = (GPS_INFO*)var.var_ptr;to cast the pointer in order to eliminate the error message [C++ Error] SDK.FlightMap.c(314): E2034 Cannot convert 'void *' to 'GPS_INFO *'.Ive changed other files to remove references to the other sample gauges because I want to build the Flight Map only.

Share this post


Link to post
Share on other sites

Which "gauges.h" file are you using? The one that comes with the SDK or the one optimized by Dai Griffiths and Arne Bartels to work with the Borland Compiler?// gauges.h// Copyright © 2003 Microsoft Corporation. All rights reserved.//// modified spring 2004 by Arne Bartels arne.bartels@nwn.de:// - definitions imported from fs2k2gauges.h// - some redefinitions for BCC and GCC compability reasons

Share this post


Link to post
Share on other sites

That may be it. The gauges.h file I'm using begins:// gauges.h// Copyright © 2004 Microsoft Corporation. All rights reserved.////Modified by Dai Griffiths, Dragonflight Design, St.Patrick's Day 2004// - Spelling errors corrected// - Mouse flags corrected so that the helpid can be inserted in the main string// - Full backwards compilation compatibility with existing FS2K2/FS2K gauges added// - All Arne Bartels' original hard work on correcting the previous two SDK gauges.h files added// - All Arne's excellent shorthand conversion macros added// - Hopefully all previous third-party gauges based on fs2k2gauges.h will now compileCan you point me to Arne Bartels' originsl file?

Share this post


Link to post
Share on other sites

Latest progress.I've used the preprocessor (CPP32) on the following code:MOUSE_BEGIN( flightmap_rect, HELP_NONE, 0, 0 )MOUSE_TOOLTIP_TEXT_STRING ("Ground Speed: %1!d! knots, Track: %2!d!

Share this post


Link to post
Share on other sites

I've looked at the macro definitions in my gauges.h (see previous post) and there appears to be an error in the expansion of MOUSE_CHILD_FUNCT. This macro does not have 'helpid' as an argument: MOUSE_CHILD_FUNCT( x, y, w, h, cursor, mouse_flags, function )Its first expansion is to:{MOUSE_RECT_CHILD, {x, y, w, h}, cursor, helpid, mouse_flags, 0, function, NULL},which does include 'helpid'. MOUSE_CHILD_FUNCT is a self-contained macro and so can't use the 'helpid' argument from the initial MOUSE_BEGIN macro and so can only leave the text 'helpid' in the source code.I've just checked the original MS gauges.h in which MOUSE_CHILD_FUNCT expands differently to:{MOUSE_RECT_CHILD, {x, y, w, h}, cursor, HELP_NONE, mouse_flags, 0, function, NULL},Note the explicit use of HELP_NONE.Replacing MOUSE_CHILD-FUNCT and MOUSE_CHILD_EVENT definitions in the revised gauges.h file with those from the original MS file solves my initial problem.Anyone know why these definitions were changed?

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