November 9, 200718 yr 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
December 2, 200718 yr >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 :(
December 2, 200718 yr 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 :-> Tim http://fsandm.wordpress.com
December 3, 200718 yr 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
December 3, 200718 yr Author 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.
December 3, 200718 yr 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!
December 4, 200718 yr 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. Tim http://fsandm.wordpress.com
Create an account or sign in to comment