I recently donwloaded the extended version of LaunchAppAndWait from the Samples section and have a question regarding the WaitForSingleObject function call. I use LaunchAppEx to load a program which brings up a DOS window, when I move the window around, I realize that the background doesn't get repainted until the program terminates. Does anybody have an idea to solve this problem? Thanks.
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

Question about LaunchAppEx
Started by
isgeek
, Jun 01 2001 14:29
4 replies to this topic
Posted 01 June 2001 - 17:19
You need to write code that has a while loop and a message processing call and use the MsgWaitForMultipleObjects call instead of the WaitForSingleObject call, which is blocking your primary thread from procesing windows paint messages.
Posted 01 June 2001 - 17:52
Thanks for the info Black Miller Wonder, I did try to use MsgWaitForMultipleObjects but couldn't get it work. Do you know if there is any references I can find from the net?
Posted 04 June 2001 - 17:33
There is an example here that uses the GetExitCodeProcess with a while loop instead of the WaitForSingleObject function. I think this would allow the background to get repainted. Just be sure to put in a small Delay() in your loop or your CPU processing percentage will hit the roof. I believe (but have not confirmed) that InstallShield does message loop processing while the InstallScript Delay() function is timing out.