Jump to content
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

>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

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...


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...