I am trying to get text from a label in a specific window.
For this I'm using the FindwindowsEx
API function, I don't know if this is the correct way:
LPSTR lpFilename;
HWND han = GetActiveWindow();
GetWindowText(han, lpFilename, _MAX_PATH) ;
HWND hanlabel= FindWindowEx(han,NULL,"Static",lpFilename);
GetWindowText(hanlabel, lpFilename, _MAX_PATH) ;
Comments
Post a Comment