Background Programs
Hello,
This isn''t really a game programming, question, but around here, you guys are usually helpful, and I need the help very badly.
I''m writing a program, that uses another program (also written by me). The first writes data to a file which tells the other to do something, and they communicate through a file.
The problem is, both have to be running at the same time, going through the same processes as if they were both active. The problm is that when one of them runs, the other becomes a background program, and when all of it is covered the OnDraw function doesn''t work either, and I need a certain piece of code to continue running.
My question is, how can I make a program thats in the background, continue to be active, or how can I make a certain program become active?
Thank you very much for the help,
If at first you don''t succeed, cheat. Repeat until caught, then lie.
Have you looked into COM?
Thats how DirectX does it''s thing.
Thats how DirectX does it''s thing.
--==JEEDIO==--
Windows gives the app with the input focus a priority boost. If your first program is spinning in a tight loop and never yielding the processor then the second program might not get any time to run. The first program should yield occasionally to give the lower priority app time to run. You can change this (on NT, don''t know about 9x) in the control panel someplace.
Also, if a window is completely covered by another one the OS won''t send it paint messages anymore because it''s not visible. You may be able to force the issue by calling InvalidateRect.
Your description of your problem really isn''t clear...
-Mike
Also, if a window is completely covered by another one the OS won''t send it paint messages anymore because it''s not visible. You may be able to force the issue by calling InvalidateRect.
Your description of your problem really isn''t clear...
-Mike
-Mike
The one program is fullscreen and covers completely the other program (the other program is an SDI).
But I need the other program, which is now background, to continue to run through its usual loop, even though its hidden.
Is there anyway I could call the OnDraw function, even if the whole window is hidden and its background. I just need the background program to write to a file, once every loop. It doesn''t do that (that write to file function is called in the OnDraw function), since the window is hidden and OnDraw isn''t called.
Is there anyway I can make the OnDraw function to continue being called even though the window is not wholly visible. Or is there any other function that continues to be called even though the window is in the background or completely covered?
I''m not sure how to use COM.
I''m very desperate,
Thank you,
But I need the other program, which is now background, to continue to run through its usual loop, even though its hidden.
Is there anyway I could call the OnDraw function, even if the whole window is hidden and its background. I just need the background program to write to a file, once every loop. It doesn''t do that (that write to file function is called in the OnDraw function), since the window is hidden and OnDraw isn''t called.
Is there anyway I can make the OnDraw function to continue being called even though the window is not wholly visible. Or is there any other function that continues to be called even though the window is in the background or completely covered?
I''m not sure how to use COM.
I''m very desperate,
Thank you,
If at first you don''t succeed, cheat. Repeat until caught, then lie.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement