- Messages
- 158
- Country

This may be common knowledge but it just bit me and I finally figured it out.
In order to clean up when my gauge is closed I have various shutdowns of sounds and such in PANEL_SERVICE_DISCONNECT. Logical, eh? And in FS9 this works well. FS9 only calls PANEL_SERVICE_DISCONNECT when you would expect -- when the panel is being disconnected due to the flight being ended, or a crash, etc.
Ah, but FSX - FSX calls PANEL_SERVICE_DISCONNECT every time the gauge is re-sized! This means when a user resizes his gauge I close up everything -- close keyboard direct input, any music or sounds playing, even shut down SimConnect -- needless to say a disaster.
The alternative (not to close up shop) leaves potentially music and sound effects playing even after the user has ended his flight. Can't do that.
So, does anyone know if there's another PANEL_SERVICE that FSX triggers when it's shutting the flight down but not when the gauge is re-sized?
PANEL_CLOSE isn't it -- that happens when the user makes the gauge disappear. PANEL_KILL isn't it either, it's called whenever the gauge is re-sized or when it's closed. I don't have much hope for this there isn't any likely candidate in gauges.h.
Alternatively, is there some tidbit of info anywhere in FSX that would let me distinguish between a re-sizing and actual shutdown?
Dutch
In order to clean up when my gauge is closed I have various shutdowns of sounds and such in PANEL_SERVICE_DISCONNECT. Logical, eh? And in FS9 this works well. FS9 only calls PANEL_SERVICE_DISCONNECT when you would expect -- when the panel is being disconnected due to the flight being ended, or a crash, etc.
Ah, but FSX - FSX calls PANEL_SERVICE_DISCONNECT every time the gauge is re-sized! This means when a user resizes his gauge I close up everything -- close keyboard direct input, any music or sounds playing, even shut down SimConnect -- needless to say a disaster.
The alternative (not to close up shop) leaves potentially music and sound effects playing even after the user has ended his flight. Can't do that.
So, does anyone know if there's another PANEL_SERVICE that FSX triggers when it's shutting the flight down but not when the gauge is re-sized?
PANEL_CLOSE isn't it -- that happens when the user makes the gauge disappear. PANEL_KILL isn't it either, it's called whenever the gauge is re-sized or when it's closed. I don't have much hope for this there isn't any likely candidate in gauges.h.
Alternatively, is there some tidbit of info anywhere in FSX that would let me distinguish between a re-sizing and actual shutdown?
Dutch
