Sign in to follow this  
Bob Familton

Sub-Window Visible in all Views - FSX?

Recommended Posts

I have a sub-window in a FSX panel that I would like to be visible, and clickable, in all other views. How can I make the sub-window visible, and clickable, in all views? Thanks, regards, Bob.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

>I have a sub-window in a FSX panel that I would like to be>visible, and clickable, in all other views. How can I make the>sub-window visible, and clickable, in all views? Thanks,>regards, Bob.Bob, I have developed some C code that will accomplish what you want. It may be used in an invisible gauge and will remain visible until explicitly closed by a mouse click.void FSAPI wincontrol_Preflight_gaugecall(PGAUGEHDR pgauge, int service_id, UINT32 extra_data){ switch(service_id) { case PANEL_SERVICE_PANEL_CLOSE: wincontrol_Preflight_panel_delay = 3; wincontrol_Preflight_panel_switch = 1; break; case PANEL_SERVICE_PRE_DRAW: // initializes gauge if (do_once == 0) { trigger_key_event (KEY_PANEL_ID_OPEN,80) ; trigger_key_event (KEY_PANEL_ID_CLOSE,80) ; do_once = 1 ; } break; case PANEL_SERVICE_PRE_UPDATE: if ( wincontrol_Preflight_panel_switch == 1 && wincontrol_Preflight_window_active == 1 ) wincontrol_Preflight_panel_delay--; if ( wincontrol_Preflight_panel_delay 80 ); } break; }}BOOL FSAPI wincontrol_Preflight_mouse_cb0( PPIXPOINT relative_point, FLAGS32 mouse_flags){if ( wincontrol_Preflight_window_active == 0 ) { wincontrol_Preflight_window_active = 1 ; trigger_key_event (KEY_PANEL_ID_OPEN,80) ; } else { wincontrol_Preflight_window_active = 0 ; trigger_key_event (KEY_PANEL_ID_CLOSE,80) ; } return FALSE;}

Share this post


Link to post
Share on other sites

Hi Bill. Thanks. I'll try it. I assume I have to name the panel with ident=80. Best regards, Bob.

Share this post


Link to post
Share on other sites

Bob, note that this code example is opening and closing panel ident=80. Window01 in the tower's default panel.cfg is specifying the ident as MICS_POPUP_7 which clearly is NOT the same as ident=80... ;)There is no option in FS for separate OPEN and CLOSE commands for a "named ident," but by checking in the new FSX gauges.h file I see that the numeric equivalent is:#define IDENT_MISC_POPUP_7 266So, simply substitute 266 wherever I've use 80 in the code example... ;)BTW, the code segment I posted is not the entire code, but only the relevant parts...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this