You can pass a user defined parameter in LPARAM so I'll leave the return of the window text to you.
In the EnumWindowProc or EnumChildProc you can pass your own type (AKA ProcessInfo_t)....
ProcessInfo_t * processInfo;
processInfo = reinterpret_cast<ProcessInfo_t*>(lParam);
In the header file of the C++ app add the following:
bool CBogusDlg::FindDesiredWindow(UINT state);
bool CBogusDlg::FindDesiredWindow(UINT state)
{
int bogus;
// If a name wasn't supplied, don't bother.
EnumWindows(EnumWindowsProc, (LPARAM)(&bogus));
return false;
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.