Jump to content
Sign in to follow this  
gapalp

Simconnect: Custom integrated window

Recommended Posts

I am really interested in how to create custom integrated windows in FSX. Has anyone made anymore progress on this? Any sample code to share that goes into more detail? I am using C# and can get a custom form to show up on top of FSX and use FSX as the handle. But of course it is a separate window so full screen FSX does not work properly and in window mode every time I click on my form FS loses sound since I "switched" to another window. It appears some FSX programs, like FSWidgets, are using an integrated window now.Even the ability to keep the FSX window as the active window so it does not lose sound would be an improvement.I have seen some FS9 programs, like FSNavigator, that have integrated windows also. Maybe someone knows how to do it in previous version of FS and can share their thoughts. I understand the theory to do this but lack the C++/C# skills to implement without seeing more samples.Thanks,gapalp

Share this post


Link to post
Share on other sites
Guest N6722c

>I am really interested in how to create custom integrated>windows in FSX. Has anyone made anymore progress on this? Any>sample code to share that goes into more detail? I am using C#>and can get a custom form to show up on top of FSX and use FSX>as the handle. But of course it is a separate window so full>screen FSX does not work properly and in window mode every>time I click on my form FS loses sound since I "switched" to>another window. It appears some FSX programs, like FSWidgets,>are using an integrated window now.>>Even the ability to keep the FSX window as the active window>so it does not lose sound would be an improvement.>>I have seen some FS9 programs, like FSNavigator, that have>integrated windows also. Maybe someone knows how to do it in>previous version of FS and can share their thoughts. I>understand the theory to do this but lack the C++/C# skills to>implement without seeing more samples.>>Thanks,>gapalpTry talking to Benjamin of FSCopilot. He knows how to do this and may offer you some help. At one time he offered me the code to do this, but I failed to take him up on his offer ... my mistake :(

Share this post


Link to post
Share on other sites

If you're writing your addon in C#, then you must be creating it as an external .EXE based addon, right? In which case, there is no way to integrate a window into FS, since your app is running in a seperate process space. The addons that add their own windows are C++ based DLL addons. As to how they add them, since we don't officially support that, I won't say :->

Share this post


Link to post
Share on other sites
Guest Daniel42

You're right.But that DLL won't contain the dllstart, dllstop functions, which are needed.So, you'll have to wrap the managed C# DLL in an unmanaged C++ DLL. I even read a post by someone who hacked the start/stop functions into the C# DLL.Daniel

Share this post


Link to post
Share on other sites

Thanks for all the suggestions. I can see how this probably needs to be a C++ dll now. But again, where to start? I got programming skills but not Windows module hacking skills. The only other suggestions about this topic is 1 thread on FSDeveloper.com. It seems if we had at least a template for the creation of a wrapped window in FSX we could get more hobbyist developers involved in making integrated add ons.Why the hush hush on how to do this? Maybe because those that are doing this are not the hobbyist programmer and are able to spend the 80 hours a week figuring it out since it is their job.I will ask this question on the FSCopilot forum to see if this Benjamin may be able to over a more.

Share this post


Link to post
Share on other sites
Guest JeanLuc_

With same hooks, you can make a process window a child of another process window nonetheless. However, I'm not sure it would work in C#, and then you have to face the issue of window redraws.One avenue could be a module in FSX, for being in-process and using some SimConnect controls to avoid the window redraw issues (the dialog mode). And then, you IPC between this module and the external app to update the in-FSX window from external app data.Hope this helps!

Share this post


Link to post
Share on other sites

Well,the reason we don't document it is because there can be issues with using certain GDI calls in a window displayed along with the DirectX stuff that FSX is using, which is why we black out the 3D window before displaying our dialog boxes (except for the Object Placement Tool, which would be kinda pointless if you couldn't also see the 3D window at the same time :-> ). I don't recall exactly what the issues are anymore though.

Share this post


Link to post
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
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...