Jump to content
The simFlight Network Forums

FS independent gauge header...


Recommended Posts

Good morning Pete... i've got one question concerning loadable modules: through the years i wrote some modules to be loaded into FS and they do they work ver well. The only thing that makes my a little bit unhappy is the gauge header. I used the gauge header for FS 8. So my modules are loaded into FS2002 as well as into FS9, but - of course - i have to make entry in the [OLDMODULES] section of my FS9 config file or say 'Yes' if FS9 wants a confirmation for loading third party software. How can i avoid this? Is there any "independent gauge header" or some thing else?

What is going wrong, if i want to add a menu item to an existing menu with AppendMenu? After retrieving the handle of the desired submenu, i use AppendMenu menu function to add a new item passing the submenu's handle as parameter, MF_STRING and its menutext, AppendMenu returns true, after this i call DrawMenuBar which alo returns true, but the added item is not visible... I also tried InsertMenuItem but did not have any success. What's going wrong?

Thy in advance, greeting from EDDL and

best regards,

Link to comment
Share on other sites

I used the gauge header for FS 8. So my modules are loaded into FS2002 as well as into FS9, but - of course - i have to make entry in the [OLDMODULES] section of my FS9 config file or say 'Yes' if FS9 wants a confirmation for loading third party software. How can i avoid this? Is there any "independent gauge header" or some thing else?

The difference is only the version number in the Linkage structure. There's a value 0x0800 in the, er, 6th (I think) DWORD in that structure, which needs to be 0x0900 for FS9. You can change it in your DLLmain function as that is called before FS gets a chance to do its linking.

What is going wrong, if i want to add a menu item to an existing menu with AppendMenu? After retrieving the handle of the desired submenu, i use AppendMenu menu function to add a new item passing the submenu's handle as parameter, MF_STRING and its menutext, AppendMenu returns true, after this i call DrawMenuBar which alo returns true, but the added item is not visible... I also tried InsertMenuItem but did not have any success. What's going wrong?

Sorry, I've no idea. I don't use AppendMenu -- I use InsertMenuItem.

Note also that FS seems to re-build its menu each time it is displayed if the option to hide it is chosen. So you have to add your items every time it does this. To do this I intercept the "WM_NCPAINT" message, get that processed by the default msg proc, then check and add my item(s) again.

Regards

Pete

Link to comment
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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.