I was wondering if anyone encountered the following error with GetOpenFileName().
The open dialog opens, and I hover my mouse over a file. The dialog shows the detailed info of the file like normal. I open my file and everything works as normal. I open the open dialog again. If I hover over any file again, the whole program is closed in a way that does not send any WM_CLOSE messages and not even windows shows up that there was an error.
A weird thing also is that this error only happends on 50% of the computer's i've tried with my program.
Maybe a work around that might work, is if there was a way of turning off the hovering detail display of files.
Ideas, thoughts?
Expand|Select|Wrap|Line Numbers
- void FileOpen(HWND hwnd)
- {
- OPENFILENAME ofn;
- char* szFileName=new char[100];
- ZeroMemory(&ofn, sizeof(ofn));
- szFileName[0] = 0;
- ofn.lStructSize = sizeof(ofn);
- ofn.hwndOwner = 0;
- ofn.lpstrFilter = "DCP Files (*.dcp)\0*.dcp\0All Files (*.*)\0*.*\0\0";
- ofn.lpstrFile = szFileName;
- ofn.nMaxFile = MAX_PATH;
- ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
- ofn.lpstrDefExt = "dcp";
- bool worked=GetOpenFileName(&ofn);
- if(worked)
- FileOpen2(hwnd, szFileName);
- }