Hi, I try to write a program which must splash until another program (Acrobat) is launching. My code:
ShellExecute(NULL, NULL, sPath, sPrm, NULL, SW_SHOWMAXIMIZED);
SetTimer( NULL, 1, 100, NULL );
while( TRUE )
if ( PeekMessage( &msg, NULL, WM_TIMER, WM_TIMER, PM_REMOVE ) )
SendDlgItemMessage(g_hToolbar, IDC_PROGRESS, PBM_STEPIT, 0, 0);
if( FindWindow(NULL, "Acrobat Reader - [File.pdf]") )
KillTimer( NULL, 1 );
It works OK on C:\\ (has no serious impact on Acrobat launch time and closes on time), but when I try it on network drive, I wait 2 minutes instead of 1 second! Besides, window not destroys itself after Acrobat window opens. Perhaps I used wrong functions?