July 7, 201015 yr Moderator Some months ago, Dai Griffiths asked me if I had any information on the order of the Panel Service IDs in FS panel system. I finally managed to locate what information I do have, so I'm posting it here for general information: #define PANEL_SERVICE_CONNECT_TO_WINDOW // on load step 1#define PANEL_SERVICE_PRE_QUERY // on load step 2#define PANEL_SERVICE_POST_QUERY // on load step 3#define PANEL_SERVICE_PRE_INSTALL // first view only step 1#define PANEL_SERVICE_POST_INSTALL // first view only step 2#define PANEL_SERVICE_PRE_INITIALIZE // any window open/close/move/resize step 1#define PANEL_SERVICE_POST_INITIALIZE#define PANEL_SERVICE_PRE_GENERATE // any windows open/close/move/resize step 2#define PANEL_SERVICE_POST_GENERATE#define PANEL_SERVICE_PANEL_OPEN // when window opened step 1 if already pre_install#define PANEL_SERVICE_PANEL_CLOSE // when window closed step 1 then init and generate#define PANEL_SERVICE_PRE_UPDATE // runs all the time if already viewed at tick18#define PANEL_SERVICE_POST_UPDATE #define PANEL_SERVICE_PRE_DRAW // runs when gauge being viewed at tick18#define PANEL_SERVICE_POST_DRAW #define PANEL_SERVICE_PRE_KILL // on unload step 1#define PANEL_SERVICE_POST_KILL #define PANEL_SERVICE_DISCONNECT // on unload step 2 Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
July 8, 201015 yr Commercial Member It's not quite the answer I was after - I was wondering exactly what each statement did in particular. For example, why would you code in _PRE_DRAW as opposed to _PRE_UPDATE etc. etc.. One thing I can add here; if anyone is looking for a panel service ID that is called only once during the lifetime of the panel (e.g. for one-time loading/unloading of something) then your only choices are _CONNECT_TO_WINDOW and _DISCONNECT. All other panel service IDs can be called more than once during the lifetime of the panel as Bill shows.-Dai
July 8, 201015 yr Author Moderator As noted, PREDRAW only runs when being viewed. So it is a good place to put undate code that doesn't need to be run if not currently on screen. After all, what's the point of running a GDI/GDI+ bit of drawing code if the results can't be seen?OTOH, it's not at all certain that any of the above is the precisely the same in the case of FSX. It was recently brought to my attention that in FSX, the [VCockpitnn] sections are processed in reverse order, from last to first! :( Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
July 8, 201015 yr Somewhere, I have a diagnostic gauge that logs them all, as they occur, so you can see how they occur, relative to one another. I'll see if I can find it...Doug
July 12, 201015 yr Commercial Member I think this is the thread we were all groping for: flightsim.com. Doug - did you ever re-upload your service gauge after the hack?-Dai
July 13, 201015 yr Pretty good info still. Could be useful one day. Thanks for posting!RegardsEtienne
Create an account or sign in to comment