Sign in to follow this  
Herbie63

how to find out if a particular window is open

Recommended Posts

i am trying to turn a hud off and on ( its in it own window), with out the keyboard. its Lips 'c' gauge HUD so i cant just use in fact to make things nasty, the switch is in a side window.so much for useing pannle id toggle. it will snap me out of the side view. i need to query if im in the front panel, if i am, is the hud on etc. i looked through the sdk panel in events ( to write to a particular window so i can pass a 1 or 0 without panel toggle) and i looked in parameters to see if i could just query fs what was open...its either not there or i missed it.some 1 smarter plz help

Share this post


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

Unfortunately you can't read the open/close status of a window as far as I know.I'm not sure if it helps, but you can force any window open or closed, instead of toggling the state.Rob

Share this post


Link to post
Share on other sites

If you are programming in C, the following is available: BOOL (FSAPI *is_panel_window_visible_ident) (UINT32 panel_id);This function will do exactly what you are looking for. If you are programming in XML, you can have a look at the attached. Essentially, it takes the result of the above function and passes the result to an XML L:Var.Doug Dawsonhttp://forums.avsim.net/user_files/128031.zip

Share this post


Link to post
Share on other sites

wow doug! thats the pip! i havent had time to draw up the code but i did put your gauge in a string test gauge and it see the windows perfectly.the dark mystery of 'c' gauges...was there anything else in the c gauge? my window00 seems to have aquired its own view point or something. when i shft1 to flip the hud on and off it drops the horizon lower then the other views. i did not mess with the view points, i dont really understand them. i did not even know you could have a different view point for each window. in fs panel studio it seems to assign the same one to all windows.

Share this post


Link to post
Share on other sites

Window00 is the only window that uses the "adjustable horizon", and normally, the only the contents of that Window (panel background & gauges) overlay.All other Windows will use a "full-screen horizon," so that is why the horizon shifts whenever you open/close WindowXX where your HUD is installed.

Share this post


Link to post
Share on other sites

darn busted!well i just discovered that about window 00i moved the hud and all was well, i raced back here to pronounce my enlightenment, to find out BUSTED! hey ignorance is only a major problem when it keeps you from trying! thaks for the snippet doug. gawd i love this place...no idea how to program and i managed to put together a fairly complex and feature rich jet.

Share this post


Link to post
Share on other sites

If you wish to specify an extra parameter on a line in panel.cfg, you have to specify all four usual parameters as well, ie, position_x, position_y, size_x and size_y. You can't drop the vertical height, as you have done in your examples. Try this:gauge38=VIGGgaugesdsd_window_status!window_0, 44,134,21,21, 00gauge39=VIGGgaugesdsd_window_status!window_1, 39,110,21,21, 01gauge40=VIGGgaugesdsd_window_status!window_2, 44,117,21,21, 100Doug

Share this post


Link to post
Share on other sites

Hi Doug,My question is not related directly to this thread, but anyways...The gauge attached to your reply seems to work as a kind of interface between .gau type and XML- type gauges, am I right?Can these kind of interfaces offer all requested parameters, especially those that can't be accessed by XML gauges?What I think about in detail is, to create something like a ground follow radar for which I need to know the ground altitude somewhere ahead of the actual aircraft's position. Unfortunately I have no skills in C-programming. Never the less I tried to understand MS SDK dealing with this subject. And trying to understand what is written in the gauge.h I found some parameters or variables that offer these required information (lat/lon/alt).So what I'd like to know is:Could it be possible to write such a kind of interface that offers those mentioned informations (about the surface altitude somewhere - well defined, of course - in front of the actual aircraft position) in some L:Variables for XML gauges?Thanks for your help,Herbert Pralle

Share this post


Link to post
Share on other sites

>What I think about in detail is, to create something like a>ground follow radar for which I need to know the ground>altitude somewhere ahead of the actual aircraft's position. >>Unfortunately I have no skills in C-programming. Never the>less I tried to understand MS SDK dealing with this subject.>And trying to understand what is written in the gauge.h I>found some parameters or variables that offer these required>information (lat/lon/alt).>>So what I'd like to know is:>Could it be possible to write such a kind of interface that>offers those mentioned informations (about the surface>altitude somewhere - well defined, of course - in front of the>actual aircraft position) in some L:Variables for XML gauges?Unfortunately, the return from those variables is always the single point directly beneath the aircraft's current position.You are perhaps wishing that you could ask "what is the ground height at latX and lonY coordinates?"Sorry! :(

Share this post


Link to post
Share on other sites

Yes Bill, exactly that's what I wish to get answered by such an interface gauge, when a XML gauges sends the desired latX and lonY values.We all have wishes don't we ? .....Maybe FS10 offers acces to all these variables for XML too. For me this would make things much easier.Otherwise I think I will need to learn C++ to try to get such things working.But I'm not shure if I will be able to learn that language - it's not as easy as XML, I think.And my brain isn't that flexibel as it was 20 years ago :-hmmm ...Thanks, Herbert Pralle

Share this post


Link to post
Share on other sites

Well, "forward terrain data" information isn't directly available to either C or XML, so on that score at least they are equivalently useless... ;)

Share this post


Link to post
Share on other sites

If it was to proof that I did not understand everything, written in that SDK - you did! :-)Never the less, thaks you. Now I can close the chapter "TFR" and open an other one - what ever that will be...Herbert Pralle

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