Hi, I have an MFC dialog project. I have a general function (without a class) that I have been using to search a directory for a certain file. This function works fine with my parent dialog. Whenever I try to use it with a modal child dialog it crashes at Code: return::CallWindowProc(m_pfnSuper, m_hWnd, nMsg, wParam, lParam); This is the declaration of the function: Code: int SearchDirectory(std::vector<std::string> &refvecFiles, const std::string &refcstrRootDirectory, const std::string &refcstrExtension, bool bSearchSubdirectories ); Please help !!! Thank you
In case anyone is ever curious I solved this by putting SearchDirectory into the parent's class then created a friend function in the child class. Still think this was strange...
Ok disregard that last post. The problem is not fixed. I didn't realize that when I tested it there was no file in the directory so it returned without an issue. When it does find a file and tries to return a vector of that file it fails spectacularly