efratomer Posted September 8, 2006 Report Posted September 8, 2006 Hello, 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? Thanks in advance! Omer.
Pete Dowson Posted September 8, 2006 Report Posted September 8, 2006 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
efratomer Posted September 8, 2006 Author Report Posted September 8, 2006 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?
Pete Dowson Posted September 8, 2006 Report Posted September 8, 2006 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
efratomer Posted September 9, 2006 Author Report Posted September 9, 2006 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.
Mayhem Posted September 9, 2006 Report Posted September 9, 2006 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....
Pete Dowson Posted September 9, 2006 Report Posted September 9, 2006 I have intercepted WM_PAINT but how I stop FS from repainting on my program? Validate the area to be painted. i.e. something like RECT rcl; ... GetClientRect(hwnd, &rcl); ValidateRect(hwnd, &rcl); Pete
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now