WaitFor Function for Dialog / Window
Hello, Newsgroupians:
I have created a program that interacts with a third-party program to which
I do not have source code. I want my program to interact with some windows
in the foreign application, but only if it does not see a specific dialog,
which resides in the foreign application. I can obtain the handle to the
dialog. If the dialog box is not there, I want my code to interact, but if
the handle is not NULL, I want my program to do something similar to
WaitForSingleObject().
I've looked at the thread and process for the foreign application's main
window and the dialog box I have an interest in, but both are same, so I
can't just wait for the process. I can think of one method to solve my
problem by injecting a new window procedure. However, this is lengthy, and
I'm not in the mood to implement it. Is there any other solution besides the
standard...
HWND hwnd;
do
{
hwnd = FindWindowEx(...);
Sleep(XXXX);
} while (hwnd);
Thank you for your time and consideration.
Trecius