• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Hexadecimal Event IDs

Messages
43
Country
us-texas
In writing C++ code for part of the electrical system, I have found between the model/animations and the code there are a lot of things that are going to need custom L:vars (and some will require associated trapping events) since there is (seemingly) no Avar to get data from the sim related to that part of the aircraft or pilot behavior, etc. My questions are in regard to using Hexidecimal EventIDs to trap an event. Before I continue I have looked at the wiki article here:

http://www.fsdeveloper.com/wiki/index.php?title=Gauges:_Resource_Numbering

In this article the Hex values are used for resource ids related to graphic files used in the gauges. The ranges given in the Wiki article are supposed to be "safe." When I looked up the first "safe" Hex number (0x0100), it was being used in gauges.h:

#define SIM_SPEED_1X 0x0100

I'm not sure if that would cause a potential conflict or not? Can these wiki hex values be used for the intended purpose I'm looking to accomplish, i.e. trap a user event? Also, I would like to know if there are any other pitfalls in using these Hex numbers for event ids to trap an event in a similar fashion to trapping stock FSX/P3D Event IDs in the Event Handler code like: KEY_PITOT_HEAT_SET.

Thanks for your help in advance.
 
Use the range specified in gauges.h:

// Third parties can use custom events in this range to communicate between 3D VC's and 2D C++ gauges.
#define THIRD_PARTY_EVENT_ID_MIN 0x00011000
#define THIRD_PARTY_EVENT_ID_MAX 0x0001FFFF

Doug
 
Jim, those "hex" numbers in the Wiki article are strictly for gauge bitmap resources. They have nothing to do with EventID numbers in mouse events. As Doug said above, use the ranges cited in the gauges.h file.

EDIT: I tried to post this yesterday, but lost connection to FS Developer before managing to post it. Imagine my surprise then to discover my text still present when I came back today, waiting for me to click on the Send button! :rotfl:
 
It says a lot about how well setup this forum software is configured, such that one's posts are saved in the buffer until one actually clicks on the "Post Reply" button. This is the only website running this software that does this in my admittedly limited experience. There may well be others, but not ones I've had occasion to visit.
 
Back
Top