"Anatoly Lyutin" <vostok(a)etersoft.ru> wrote:
+ thread = CreateThread( NULL, 0, create_messagebox_thread, &info, 0, &tid ); + while(info.hWndDlg == NULL) + info.hWndDlg = FindWindowA(NULL,info.ch);
This is too hackish IMO, if dialog creation fails for some reason the test will hang.
+ + PostMessageA(info.hWndDlg,WM_COMMAND,IDCANCEL,0); + Sleep(nTimeOut); + if(info.ret==-1) + SendMessageA(info.hWndDlg,WM_COMMAND,Data[i].nExitMessage,(LPARAM)GetDlgItem( info.hWndDlg, Data[i].nExitMessage ));
Why don't you check whether 'info.ret==-1' is a legitimate response or not?
+ Sleep(nTimeOut); + ok(info.ret == Data[i].nReact,"This dialogue has incorrect reaction on IDCANCEL!\n"); + CloseHandle( thread ); + } +}
And these Sleep() calls are potential races. -- Dmitry.