Am facing a problem in identifying the child window, Let me explain this... Here child window title is "Liquidate Position : 3692". Here everytime in child window Reference ID will be different i.e.,For Eg: 1) "Liquidate Position :3693" (2)"Liquidate Position : 4521" . So, if I want to identify the child window using the FindWindow() API, it will be quite difficult because everytime window title changes. So tought of identifying the Child window by mentioning the substring using EnumWindows and my code looks like this:
BOOL CALLBACK FindWindowBySubstr(HWND hwnd, LPARAM substring)
const DWORD TITLE_SIZE = 1024;
if (GetWindowText(hwnd, windowTitle, TITLE_SIZE))
if (_tcsstr(windowTitle, LPCTSTR(substring)) != NULL)
BOOL b = ::IsWindowVisible(hwnd);
return true; }
const TCHAR substring = TEXT("Liquidate");
With this my code anyway am able to find the child window here, thats great !!! But the problem is.. while tracing the code
GetWindowText(hwnd, windowTitle, TITLE_SIZE)
It finds the windows like Start,CiceroUIWndFrame,JumpList,Task Switching,Start menu,IDD_EIML_Dialog-Dialog,Network Flyout and so on.. And i think it finds all the windows on my system.
But my application is completely time constraint application eventhough 1~2sec delay will create a problem for me. And moreover this code finds all the windows on the system & obviously it will consume lot of time.
Please can anyone suggest/guide me the fastest way to find it..
Thank you all..