Jump to content
The simFlight Network Forums
Sign in to follow this  
FlyingCoder

Adding new items on Addons

Recommended Posts

Hi guys, first of all, nmot sure if this is the right section to ask but i would like to ask, how do i add new items under the Addon's section? Currently, i am developing a software and i would like my pilots to access it via the ADDONS button rather than having to start them externally. I have no clue how and i am currently using FSUIPC for my software. So, when my pilots press the Addons, my application name will appear. How do i do that?

Share this post


Link to post
Share on other sites
2 hours ago, FlyingCoder said:

mot sure if this is the right section to ask but i would like to ask, how do i add new items under the Addon's section? Currently, i am developing a software and i would like my pilots to access it via the ADDONS button rather than having to start them externally

No, it isn't really the right forum as it is purely a question about P3D which is answered in the L-M website.

However, you should be able to learn from any other Addon files you hsave in your documents folder in Windows. Look in the  Prepar3D v4 Add-ons folder (or v3 as appropriate). There's a separate subfolder for each add-on, and the crucial part in those is the Add-on.xml file which tells P3D exactly what to load and where it is.

Pete

 

 

Share this post


Link to post
Share on other sites

Hi pete, i managed to do it. However, i noticed that when i click on your software, the windows form will appear then the black screen will appear and the sim will be paused. How do i do that? I know this EVENT_SIM_STOP thingi but not sure how to use it. Are you able to guide me?

Share this post


Link to post
Share on other sites
1 hour ago, FlyingCoder said:

However, i noticed that when i click on your software, the windows form will appear then the black screen will appear and the sim will be paused.

Do you mean the FSUIPC In-Sim options?

1 hour ago, FlyingCoder said:

the windows form will appear then the black screen will appear and the sim will be paused. How do i do that?

Request "DIALOG MODE" from SimConnect before invoking the Windows dialog box (for that is what it is -- FSUIPC is written in C and knows nothing of "Forms"). You don't need to use the SIM STOP event.

Pete

 

Share this post


Link to post
Share on other sites

Hi pete, i have already requested a dialog mode. But seems that my exe is running "externally" and i can see the icon on the taskbar. Your FSUIPC is not visible on my taskbar. That is what im trying to achieve as of now but have not able to.

Share this post


Link to post
Share on other sites
31 minutes ago, FlyingCoder said:

i have already requested a dialog mode. But seems that my exe is running "externally" and i can see the icon on the taskbar. Your FSUIPC is not visible on my taskbar. That is what im trying to achieve as of now but have not able to.

Ah, yes. FSUIPC is a DLL running inside the Sim. There are a lot of things you can't do from an external process (which is why FSUIPC has always been an internal module, not a separate process).

Pete

 

Share this post


Link to post
Share on other sites
42 minutes ago, FlyingCoder said:

So meaning, i can't follow your way/style? Ah yes, talking about DLL, am i able to run DLL instead?

You need to code the DLL. There are plenty of add-on DLLs. The can be loaded via the Add-On.xml method as others, or by direct entries in the DLL.XML file (as is currently the case with FSUIPC).

You'd need to read up about programming DLLs.  That's a Windows thing. There are rules for P3D DLLs but the programming has first to follow Microsoft Windows rules for DLLs.

Pete

 

Share this post


Link to post
Share on other sites

I tried the p3dv4 sdk using the dialogmode sample. But, they are all in exe. If i change the application from exe to dll, will it do it? I mean will it be the same? Then i will do the settings via DDL.xml is the way ?

Share this post


Link to post
Share on other sites
3 hours ago, FlyingCoder said:

I tried the p3dv4 sdk using the dialogmode sample. But, they are all in exe.

I didn't know there was a sample. So didn't that work? What was wrong?

3 hours ago, FlyingCoder said:

If i change the application from exe to dll, will it do it?

You need to program it as a DLL. For example, there's no WinMain but a DLLMain. And unless you create a separate thread you don't have your own WndProc -- the main Windows message processing WndProc is the process one, in P3D. Then the SimConnect interface is a bit different. You have to declare different things, and there's a DLLstart which it calls when ready.

i really cannot undertake a tutorial here. You'll have to do first the Windows DLL programming techniques then the special application to SimConnect.

Pete

 

 

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.

Loading...
Sign in to follow this  

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