hi, below i read a file path from a data file and open that file with ShellExecute(). then i read the window name of that file from the data file(it's been stored previously), and search for that window with EnumWindows(), cos i want a handle to it. But in the window list i cannot see the name of the window i've just opened with ShellExecute(). why is that please?
thanx.Code:..... savedat>>path; //file path ShellExecute(NULL,"open",path,NULL,NULL,SW_SHOWNORMAL); savedat.getline(wndname,256,'$'); // wnd name EnumWindows(Wndfunc1, NULL); // srch 4 wnd name ..... BOOL CALLBACK Wndfunc1(HWND hwnd, LPARAM lParam ) { char title[256]; GetWindowText(hwnd, title, 256); ....... if(strstr(title,wndname)!=NULL) { //dostuff ....... } }



LinkBack URL
About LinkBacks


