Alright! Problem solved. For some reason it is necessary to set the flag OFN_NOCHANGEDIR to prevent GetOpenFileName() from
interfering with the fstreams. In frustration, I decided there was a finite number of settings for the OPENFILENAME members, and proceeded to systematically try them all...
The memory issue appears to have gone away, and I am unable to find what caused it in the first place. I just now tested it with the code I posted a few days ago, and It no longer crashes. However, the program is still unable to use functions from the fstream library. Oddly though, the program...
I have tried setting the owner to the handle of the application and the dialog from which it is called. I am not using any of the filenames in this part of the program, I am using them to generate a configuration file for another part of the program. Once I have gotten a string from the openfile...
I am having a problem with this function as well
I used this code in my dialog callback to get a filename
case IDC_BUTTON1:
OPENFILENAME ofn;
char fname[300] = "";
ZeroMemory(ofn, sizeof(ofn));
ofn.nMaxFile = sizeof(ofn);
ofn.lptstrFile = fname;
ofn.lptstrFilter =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.