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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...