Jump to content
The simFlight Network Forums

Forcing a child window in FS2004


Recommended Posts

I have tried forcing my program to be a child window of FS2004 but evrything I tried only made it a child and while the form is flickering, How can I stop it from flickering?

Good question. It was okay in FS2002 and before. If you find the aswer let me know. I could only do it by intercepting the main FS window WM_PAINT calls and dealing with them myself to stop FS painting over my Window which then redrew (hence the flicker).

The easiest way, of course, is to only run in Windowed mode.

If you ever find a good way, please let me know.

Pete

Link to comment
Share on other sites

I have tried forcing my program to be a child window of FS2004 but evrything I tried only made it a child and while the form is flickering, How can I stop it from flickering?

I could only do it by intercepting the main FS window WM_PAINT calls and dealing with them myself to stop FS painting over my Window which then redrew (hence the flicker).

Do you have any idea how is it done using API functions?

Link to comment
Share on other sites

Do you have any idea how is it done using API functions?

What, intercepting WM_PAINT messages? Subclass the Window, process the messages. I wouldn't know any other way of getting into Windows other than using the API. What other ways are there?

Pete

I have intercepted WM_PAINT but how I stop FS from repainting on my program?

Thanks.

Link to comment
Share on other sites

Windows flicker because of directX, Same with most games that use it...

If you can get your timing right with the Application/Game then you might be lucky to "trick" the flickering effect but when timing goes out, example game lag / system lag then timing goes out & your back to the start.

By grabbing a handle on the FlightSim exe / process you can get the timing right by intercepting the WM_PAINT & other *Window Messages*.

But over all the only luck i have had has been to use a "Window" created within the FS2004 Application eg... Modules that call a CreateWindowEx call.

Fs2004 uses a MDI interface as far as i can tell, The "World" & "Cockpit" windows are children, Why such programs work when paused because directX stops rendering... If you can create a DirectX Overlay layer then that will work... Then there are issues with flight sim loosing focus & pauseing & losing sound...

With VB / C++ it would be possible to create a "Seperate Exe File" as long as it will grab a hwnd Handle on fs2004 & create a window within the fs2004 process....

There are previous post with working examples

but comes down to fact fs2004 is made with directX....

DirectX must be using a an overlay, while some VB "Always OnTop" codes work... they stop working when you goto "FullScreen" Mode....

Link to comment
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
×
×
  • 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.