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.

Add Menu Items

Featured Replies

Hey All, I'm a learning programmer..in other words i'm trying to learn the C# language so i can write an addon for FSX. Anyways, I have a program that connects to simconnect and Fsx. But what I can't seem to do is have that program exist within Fsx and have a menu item within FSX for it. Ive spent hours trying to get the samples included with the SDK working and I must be missing something because I can't get them to work! I opened them with Microsoft C++ Express and they always contain errors. Anyway, any help with this would be very much appriciated. Thank you.

Hi,Try this one: enum EVENTS { EVENT_MENU_ONE, EVENT_MENU_TWO, }; enum MENU_GROUP_ID { GROUP_MENU };Put these lines into initClientEvent():simconnect.MapClientEventToSimEvent(EVENTS.EVENT_MENU_ONE, "");simconnect.AddClientEventToNotificationGroup(MENU_GROUP_ID.GROUP_MENU, EVENTS.EVENT_MENU_ONE, false);simconnect.MapClientEventToSimEvent(EVENTS.EVENT_MENU_TWO, "");simconnect.AddClientEventToNotificationGroup(MENU_GROUP_ID.GROUP_MENU, EVENTS.EVENT_MENU_TWO, false);simconnect.MenuAddSubItem(EVENTS.EVENT_MENU_MAIN, "1st Menuitem", EVENTS.EVENT_MENU_ONE, 10001); //I think 10001 can be any number, I tried this onesimconnect.MenuAddSubItem(EVENTS.EVENT_MENU_MAIN, "2nd Menuitem", EVENTS.EVENT_MENU_TWO, 10002);simconnect.SetNotificationGroupPriority(MENU_GROUP_ID.GROUP_MENU, SimConnect.SIMCONNECT_GROUP_PRIORITY_HIGHEST);You can put your code into simconnect_OnRecvEvent://1st menu selectedcase (uint)EVENTS.EVENT_MENU_ONE://Put your code here for the 1st menubreak;//2nd menu selectedcase (uint)EVENTS.EVENT_MENU_TWO://Put your code here for the 2nd menubreak;Don't forget to remove menuitems before disconnect:simconnect.MenuDeleteSubItem(EVENTS.EVENT_MENU_MAIN, EVENTS.EVENT_MENU_ONE);simconnect.MenuDeleteSubItem(EVENTS.EVENT_MENU_MAIN, EVENTS.EVENT_MENU_TWO);This code works for me.Endre

Thanks for the reply, I had some problems with Simconnect and so couldn't try out what you suggested until today. To be honest I think my programming knowledge is too basic for this forum and I certainly don't wanna be one of those guys who just asks people to do it for them! So, if you can and don't mind helping me thanks and if not I understand. Anyways I couldn't get that code to work. No matter what I do it just won't compile for me with a huge amount of errors!! :( I think I have some basic things like where to put initclientevent() and things like that wrong. So a quick guide on this would be very helpful! Thanks.

>Thanks for the reply, I had some problems with Simconnect and>so couldn't try out what you suggested until today. To be>honest I think my programming knowledge is too basic for this>forum and I certainly don't wanna be one of those guys who>just asks people to do it for them! So, if you can and don't>mind helping me thanks and if not I understand. >Anyways I couldn't get that code to work. No matter what I do>it just won't compile for me with a huge amount of errors!! :(>>I think I have some basic things like where to put>initclientevent() and things like that wrong. So a quick guide>on this would be very helpful! Thanks. I don't want to use this forum to pimp my blog a bunch, but the whole point of my simconnect tutorials is to start beginner programmers off towards writing simconnect programs in C#, so it might be a place to look.Also, Tim posted a great find in this online beginners C# book:http://www.programmersheaven.com/2/CSharpBook

And i noticed yesterday that in managed SimConnect (SP1) the data.uGroupID value upon receiving a menu event is not set to the correct group ID of the menu events. Instead i receive it with the UNKNOWN_GROUP like all other subscribed system events which cost me an hour since menu events were not recognized ...So as a good practice, don't assume that you'll receive any event with a correct group. Just use unique event IDs for your own stuff that don't interfere with system event id's to be on the safe side.

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.