View Full Version : How to display a window within FS window
I see many plugins can display a window inside FS with different styles (Such as the default ATC simulator window, the IVAO virtual pilot client window), is there any instruction of how to implement this feature?
Thanks for your help.
22 May 2007, 07:37
As far as I know you need to write a module dll. I think it has to be in C++. I don't work with modules myself but I think some of the other guys here do so they may be able to provide some more information.
02 Jun 2007, 18:07
I've had mixed luck with creating modeless windows using the standard win32 API from within a C++ module in FS. Obviously, it can and has been done (example, FSNavigator), or built-in dialogs not part of the standard UI (ex, TrafficTools).
There is no documentation on the subject I was able to find.
Modal windows (example, FSUIPC) are not a problem because you can set FS in dialog mode (black background), and processing stops as you interact with the window until it closes.
All dialogs and panels (when created with the gauge SDK) are normal container windows.
The problem (from what I can tell) is to get modeless windows to paint. If they don't paint, they simply "disappear".
The basic method to create a window outside the panel SDK is to locate the handle of the main FSX window ("FS98MAIN"), then use CreateWindowEx to create a dialog (or whatever library you use to create the window).
As long as the owner of the new window is the FSX window, and the z-index is in front, you should be good to go, at least for one paint cycle.
Note that DirectX can only render a child window in front of the background window in full screen mode. If your window shows up when FSX is in windowed mode, but not in full screen mode, that's the problem.
I'll share what I find as I explore this in greater detail. Spy++ is a great tool to use to find out what window is out there, and how it's setup.
I think once I get the re-paint going and tied to the main FSX UI processing loop, that will do it. There's a trick for sure, but there are seemingly few in the know...
vBulletin® v3.8.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.