November 5, 200619 yr 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.
November 5, 200619 yr Moderator >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;} Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
November 5, 200619 yr Author Hi Bill. Thanks. I'll try it. I assume I have to name the panel with ident=80. Best regards, Bob.
November 5, 200619 yr Moderator 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... Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment