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.

Current panel ID

Featured Replies

This is a for a C gauge.Working on an auto-close function for a panel (such as, click the "x" and panel is toggled off). Easy to do if you know the ID of the panel. In my case, the panel is a custom panel, and it does not have an "ident" line in panel.cfg.An internal ID is no doubt assigned to it, but I need to know what it is at runtime.I suspect it's in a PELEMENT somewhere passed to the main loop, or perhaps as an event.Anyone know of a quick method to retrieve the panel ID at runtime?Cheers,

If it hasn't an ident line, add one. Check the gauges.h of the Panel SDK which are predefined and use one of them or a different numeric value. If you know the ID you can also work with the new functions is_panel_window_visible_ident and panel_resource_string_get (whatever this function does).Arne Bartels

Thanks Arne,I suspected you'd jump on this (waiting for J.O.) :)Placing an ID in the panel.cfg does make it easy and is the obvious way, but it also hardcodes the gauge to a specific panel ID, something I'd like to avoid, especially if the same gauge appears on multiple panels with different IDs.Granted, I can pass the ID of the panel to the gauge as a parameter in the panel.cfg file, but I was seeking to avoid having to do this. I was thinking to extract the ID of the containing panel directly during the gauge initialization via the main callback routine, during one of the following events:#define PANEL_SERVICE_PRE_QUERY 0#define PANEL_SERVICE_POST_QUERY 1#define PANEL_SERVICE_PRE_INSTALL 2 // extra_data = resource_handle#define PANEL_SERVICE_POST_INSTALL 3 // extra_data = resource_handle#define PANEL_SERVICE_PRE_INITIALIZE 4#define PANEL_SERVICE_POST_INITIALIZE 5#define PANEL_SERVICE_PRE_UPDATE 6#define PANEL_SERVICE_POST_UPDATE 7#define PANEL_SERVICE_PRE_GENERATE 8 // extra_data = phase#define PANEL_SERVICE_POST_GENERATE 9 // extra_data = phase#define PANEL_SERVICE_PRE_DRAW 10#define PANEL_SERVICE_POST_DRAW 11#define PANEL_SERVICE_PRE_KILL 12#define PANEL_SERVICE_POST_KILL 13#define PANEL_SERVICE_CONNECT_TO_WINDOW 14 // extra_data = PANEL_WND#define PANEL_SERVICE_DISCONNECT 15 // extra_data = PANEL_WND#define PANEL_SERVICE_PANEL_OPEN 16#define PANEL_SERVICE_PANEL_CLOSE 17The questions are thus:- can a gage determine at runtime what panel it belongs to through the callback routine? (from the service_connect event, we can get the PANEL_WND) so I guess the answer is yes. - can this panel handle be converted to the ID usable in the KEY_PANEL_TOGGLE event (takes the ID as a parameter to toggle the said panel)?

  • 3 years later...
  • Commercial Member

Did you have any luck with this? I can get the panel entry key and hWnd from the gauge header, but not the name of Window. I've tried calling GetWindowText() on the hWnd but this returns nothing.Anyone have any ideas?Andrew

Andrew Wilson

sig_fslDeveloper.jpg

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.