Jump to content
Sign in to follow this  
Guest bartels

Gauge Ini Files?

Recommended Posts

I just saw a gauge that had an ini file that allowed the gauge to be seen in all views. It was a short file that had:[OPTIONS]PanelVisibleInAllViews=1Can I just make an ini file like this for any other gauge I want to be seen in any view, or does the reference to the ini file have to be in the gauge itself? If it does have to be referenced in the gauge file, is there any way to add this capability to an existing gauge? Thanks, regards, Bob.

Share this post


Link to post
Share on other sites

Bob,This is the kind of thing that has to be built into the gauge when it is compiled. You will not be able to modify an existing gauge to include this feature.It certainly wouldn't be difficult to produce a generic sort of gauge that could be added to an existing panel to force a particular window to be always visible.Doug

Share this post


Link to post
Share on other sites

Hi Doug. That's what I was afraid of. I am no gauge programmer. Is there a possibility that you, or someone else, could design one for me? I want to be able to have Bill Morad's excellent ATC gauge visible in all views. Thanks, regards, Bob.

Share this post


Link to post
Share on other sites

Bob,I think this will do the trick. I cheated a little. This gauge doesn't use an .ini file. To specify the window you want to force, list its Ident number as an extra parameter on the panel.cfg entry for this gauge. For example:gauge47=dsd_window_control!window_control, 5,5,20,20,10030This entry will force the window whose Ident is 10030 to be visible at all times.This gauge goes on the main panel. It is RGB(0,0,0) so it will not be visible - you can place it anywhere.If you have any trouble, just holler.Doug

Share this post


Link to post
Share on other sites
Guest zip

To confirm, I coded my gauge (referenced above) with WINAPI calls to handle ini file I/O using regular Windows system calls. Just remember that a gauge is like any other DLL in Windows, and that you have access to the full Windows APIs (WIN32, DirectX, etc..), even if specific structures are required by FS for the handshake. Your DLL just works within the set callbacks FS9 requires, but aside from that, anything goes. INI file handling is very easily accomplished using the GetProfileString(), GetPrivateProfileString() and SetProfileString(), SetPrivateProfileString(). Of course, not all calls can be made anywhere in the gauge callbacks (you can, but it may not be wise). Due to the near total lack of documentation from MS from a dev point of view, most of it is trial and error.Read up on INI files here:http://msdn.microsoft.com/library/default....ofilestring.aspThe difficulty is to figure out what folder the INI file is in. You can get that either through the Windows registry looking for the FS9 registration keys that will tell you where FS is installed, through the process information (fs9.exe) startup path, or via FSUIPC.Hope this helps,Etienne

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