Jump to content
The simFlight Network Forums

module programming


Recommended Posts

I guess this is not the quite the right forum for this, but because I don't know any better site where I can get FS programming support and my program also uses FSUIPC, I'll try it here:

So, I have a working program running as a standalone exe-file. Now I'ld like to inlcude that program into the FS2004 as a module. The first problem I have is that I don't know how to add a new entry into the FS-Menu. I know some Win-API and in my opinion I need the name of the menu-handle. Am I right with that or do I need to do it a different way ?

Link to comment
Share on other sites

So, I have a working program running as a standalone exe-file. Now I'ld like to inlcude that program into the FS2004 as a module.

Are you really sure you want to take that route? If it works through FSUIPC then it also works through WideFS and so can be used on Networked PCs. This is a big advantage of external programs, and the only reason I don't use FSNavigator at all -- that is an FS Module and cannot be run on other PCs.

The first problem I have is that I don't know how to add a new entry into the FS-Menu.

If that's the first problem, then you must already have worked out how to make your program into an FS Module?

There are facilities provided in FSUIPC for programs or modules to add an entry to the Modules menu. If that is not sufficient you have to start doing things like subclassing the FS window procedure and adding your stuff to FS's menu every time it is redrawn. It gets quite complicated.

I know some Win-API and in my opinion I need the name of the menu-handle.

There's no such thing as a "name of a menu handle". Menus have handles, and you get them by "GetMenu". But the problem in FS is that, unless the user has opted to have the menu displayed all the time (most distracting), it doesn't actually exist. In its so-called "hidden" state in fact it doesn't exist. It is rebuilt from scratch each time it is called up. You have to detect this and add your entries every time.

Regards,

Pete

Link to comment
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.

Loading...
 Share

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