• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

How to display a window within FS window

Messages
4
Country
china
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.
 
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.
 
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...

Cheers,

Etienne
 
Last edited:
Back
Top