alvaro5 Posted June 6, 2005 Report Posted June 6, 2005 I hope someone can help me with this one. I would like to open and close panels (windows in panel.cfg) from an external program (SIOC). What are the offsets to open, for instance panel #2 (or better panel with ID 70) ? And also, what are the offsets where I can see if a panel (by number or by ID) is visible at a certain time? Thank you very much for you help. I have not found this in the documentation. Sorry if it is somewhere. Alvaro
Pete Dowson Posted June 6, 2005 Report Posted June 6, 2005 I hope someone can help me with this one. I would like to open and close panels (windows in panel.cfg) from an external program (SIOC). What are the offsets to open, for instance panel #2 (or better panel with ID 70) ? I don't know of any way to do that by ID, but you can send the FS controls for Panel 1-Panel 9 selection via offset 3110. You'll need the control numbers, which you will find in the "List of FSxxxx controls" documents availavle -- the FS2004 one is included in the FSUIPC package these days. And also, what are the offsets where I can see if a panel (by number or by ID) is visible at a certain time? I don't think there are any 'offsets' for that. Sorry. That's an area of FS I know very little about. I suppose if you are running on the same PC as FS you could ennumerate FS's Windows and try to identify them by window title, though that's user-definable I think. All the ClassNames are "FS98CHILD" so you can't identify them that way, and if they are undocked you have even more problems to find them. Regards, Pete
ddawson Posted June 7, 2005 Report Posted June 7, 2005 Alvaro, The controls you will want for use through offset 3110 are: KEY_PANEL_ID_TOGGLE 66506 KEY_PANEL_ID_OPEN 66507 KEY_PANEL_ID_CLOSE 66508 Each takes, as a parameter, the ID number of the panel window you wish to control. There is a function defined in GAUGES.H to determine if a panel window is visible or not, but it is just that - a function, not an FS Key Event. Doug Dawson
Pete Dowson Posted June 7, 2005 Report Posted June 7, 2005 The controls you will want for use through offset 3110 are: KEY_PANEL_ID_TOGGLE 66506 KEY_PANEL_ID_OPEN 66507 KEY_PANEL_ID_CLOSE 66508 Each takes, as a parameter, the ID number of the panel window you wish to control. Ah! Thank you Doug. I didn't know about those. Pete
alvaro5 Posted June 8, 2005 Author Report Posted June 8, 2005 Thank you. My problem now is that I don't know to write the 8 bytes in one block. For instance what number do I have to write for control 66507 (KEY_PANEL_ID_OPEN) with the parameter 70 (my window ID) ? Regards Alvaro
Pete Dowson Posted June 8, 2005 Report Posted June 8, 2005 Thank you. My problem now is that I don't know to write the 8 bytes in one block. For instance what number do I have to write for control 66507 (KEY_PANEL_ID_OPEN) with the parameter 70 (my window ID) ? Not one number, two numbers. You want a structure or an array with two numbers. In C something like: int controls[2]; DWORD dwResult; controls[0] = 66507; controls[1] = 70; FSUIPC_Write(0x3310, 8, (BYTE *) controls, &dwResult); etc. You must be able to do that in any language, after adapting it to suit of course. Regards, Pete
leelg Posted December 2, 2005 Report Posted December 2, 2005 Pete, I assume you added this to FSUIPC since it is possible to map buttons to turn panels on/off. This is great but I have a related question. Do you know a way to determine the panel ident for panels with string or enumerated names? For example, what is the numeric ident for the "Collective_panel". My aircraft has several named panels and I need to make sure they are off which seems to be only possible by supplying a numeric panel id. I am hoping if you don't know the answer, someone else will. Thanks! Lee
Pete Dowson Posted December 2, 2005 Report Posted December 2, 2005 Do you know a way to determine the panel ident for panels with string or enumerated names? For example, what is the numeric ident for the "Collective_panel". Aren't the IDs declared in the Panel.cfg file? In the line "ident= ..."? For the FS-supplied default panels FS seems to understand names for the IDs. like "MAIN_PANEL", but these must always translate into the same numbers. For additional panels numbers are used in that declaration -- I assume these are the IDs you need? [LATER] Just found the built-in panel ids (they are in the Panels SDK): // Panel identifiers #define IDENT_MAIN_PANEL 0 #define IDENT_THROTTLE_PANEL 10 #define IDENT_RADIO_STACK_PANEL 50 #define IDENT_COMPASS_PANEL 75 #define IDENT_MINI_CONTROLS_PANEL 100 #define IDENT_ANNUNCIATOR_PANEL 125 #define IDENT_ANNUNCIATOR2_PANEL 150 #define IDENT_IFR_MAIN_PANEL 175 #define IDENT_COLLECTIVE_PANEL 200 #define IDENT_GPS_PANEL 225 #define IDENT_OVERHEAD_PANEL 250 #define IDENT_USER 10000 #define IDENT_USER_MAX 19999 #define IDENT_AIRCRAFT_HUD_3D_PANEL 20000 #define IDENT_HELICOPTER_HUD_3D_PANEL 20001 #define IDENT_CONTROLS_HUD_3D_PANEL 20002 #define IDENT_TEXT_HUD_3D_PANEL 20003 #define IDENT_DAMAGE_HUD_3D_PANEL 20004 #define IDENT_SCORE_HUD_3D_PANEL 20005 #define IDENT_LSO_WINDOW 22000 Regards Pete
leelg Posted December 3, 2005 Report Posted December 3, 2005 Thanks! That is excatly what I was looking for. I guess it was just to late in the evening :oops: . I scanned the SDK panels doc but didn't think about checking the header file. Sorry to take up your time and THANKS! Lee :D :D BTW, it never ceases to amaze me the things that can be done with FSUIPC.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now