• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FS2004 Sample simple gauge needed

Messages
11
Country
russia
Hello everyone!
I am wondering, could some one give me the simplest gauge example project?
Visual C++ or Borland C++ Builder projects will be good.

Or maybe there is example project somewhere?

p.s.:
i'm unable to compile makefile project from this site
p.p.s.:
i have a simple fuel meter vc++ project but it doesn't seem to receive data from sim
 
There is a complete example of a multi-gauge cluster in the SDK...
 
Yes, there is. But there is some kind of problem compiling it.
Anyways, i found onew fuel gauge sample and after adding some "update" functions it compiled at last!

Now i'm wondering how to read some gauge data from non-default airplane's gauges. Using File Mapping and stuff.

BTW, i have sample code fragment which i cannot compile. Any suggestions how todeclare p_d2 variable?

Code:
p_d2 = (UINT32*)((BYTE*)hm - 0x10000000 + 0x1000000c);
 
Not a clue...

There is a small problem with the SDK's example. I have a working set of files for use with Visual Studio v6.0 and beyond. If you'd like the zipped solution, write to me at n4gix@comcast.net and I'll send 'em via attachment.
 
thanx, but i DID find the solution!
:-)

but there is another question.
Why does after this code

HANDLE hm = GetModuleHandle("file.gau");

in sim i still have hm = NULL ?
 
Last edited:
Why does after this code

HANDLE hm = GetModuleHandle("file.gau");

in sim i still have hm = NULL ?

Probably because, whatever file operation you start in a .GAU file (I assume this code it's located in a gauge), the path is always relative to the flight sim root folder so, if you need to access any file, you need to set the path starting from FS root, something like:

HANDLE hm = GetModuleHandle("GAUGES\\file.gau");

If your file.gau it's in the Gauges folder, or course...

However, why you would need the module handle of a gauge from within another gauge (or, are you trying to get the module handle of *yourself*, meaning FILE.GAU is the name of this gauge ?? ) ?
 
as it turned out, the reason of NULL was incorrect type of variable.
hm should NOT be HANDLE. it must be HMODULE
in that case - code works ok

thanx for help ;-)
 
Back
Top