diff --git a/Compare.c b/Compare.c index a543f41..7a69bf5 100644 --- a/Compare.c +++ b/Compare.c @@ -80,8 +80,10 @@ static BOOL CALLBACK enum_wnd_proc(HWND hwnd, LPARAM lParam) { #ifdef DEBUG_PRINTF printf("Static found!\n"); #endif - char text[] = "-200.0%"; - SetWindowTextA(hwnd, (LPSTR)text); + wchar_t text[_MAX_PATH]; + wcscpy_s(text, _MAX_PATH, L" -200.0%"); + + SetWindowTextW(hwnd, (LPCWSTR)text); } } @@ -109,9 +111,20 @@ static BOOL CALLBACK enum_wnd_proc(HWND hwnd, LPARAM lParam) { #ifdef DEBUG_PRINTF printf("Static found!\n"); #endif - char text[_MAX_PATH]; - GetWindowTextA(hwnd, (LPSTR)text, _MAX_PATH); - printf("Similarity Score:%s\n", text); + wchar_t text[_MAX_PATH]; + + for (int i = 0; i < 50; ++i) { + GetWindowTextW(hwnd, (LPCWSTR)text, _MAX_PATH); + + if (wcscmp(text, L" -200.0%") == 0) { + Sleep(100); + } + else { + break; + } + } + + printf("Similarity Score:%ls\n", text); } } @@ -187,9 +200,7 @@ int wmain(int argc, wchar_t* argv[], wchar_t* envp[]) { compareStruct.regim = REGIM_COMPARE; EnumChildWindows(hwnd, enum_wnd_proc, (LPARAM)(&compareStruct)); - - Sleep(600); - + compareStruct.regim = REGIM_RESULT; EnumChildWindows(hwnd, enum_wnd_proc, (LPARAM)(&compareStruct)); diff --git a/Compare/Release/Compare.iobj b/Compare/Release/Compare.iobj index 381db94..2570f9f 100644 Binary files a/Compare/Release/Compare.iobj and b/Compare/Release/Compare.iobj differ diff --git a/Compare/Release/Compare.ipdb b/Compare/Release/Compare.ipdb index 898d6ff..93f9dda 100644 Binary files a/Compare/Release/Compare.ipdb and b/Compare/Release/Compare.ipdb differ diff --git a/Compare/Release/Compare.log b/Compare/Release/Compare.log index 02067c0..7d7cc48 100644 --- a/Compare/Release/Compare.log +++ b/Compare/Release/Compare.log @@ -1,7 +1,8 @@  Compare.c +C:\VC\Compare\Compare.c(117,39): warning C4090: функция: разные квалификаторы "const" Создание кода Создание кода завершено - 2 of 6 functions (33.3%) were compiled, the rest were copied from previous compilation. + 0 of 6 functions ( 0.0%) were compiled, the rest were copied from previous compilation. 0 functions were new in current compilation 0 functions had inline decision re-evaluated but remain unchanged Compare.vcxproj -> C:\VC\Compare\Release\Compare.exe diff --git a/Compare/Release/Compare.obj b/Compare/Release/Compare.obj index 3c280d0..9e1bf85 100644 Binary files a/Compare/Release/Compare.obj and b/Compare/Release/Compare.obj differ diff --git a/Compare/Release/vc143.pdb b/Compare/Release/vc143.pdb index 60e1b70..6f0c35d 100644 Binary files a/Compare/Release/vc143.pdb and b/Compare/Release/vc143.pdb differ diff --git a/Release/Compare.exe b/Release/Compare.exe index ab8f5f6..140beac 100644 Binary files a/Release/Compare.exe and b/Release/Compare.exe differ diff --git a/Release/Compare.pdb b/Release/Compare.pdb index 133c34b..a3fbc62 100644 Binary files a/Release/Compare.pdb and b/Release/Compare.pdb differ