Hi everybody!
I have a problem with CFiledialog Save button in Win7.
I use MFC and VC++ 2010. I'm developing the application under win xp and there are no problems. When I launch the sofware under win 7, the filedialog save pop up opens but when I press the "Save" button nothing happens! I can press the button a thousand times but nothing happens! if I write the name of an existing file it works fine.
I try to used OPENFILEDIALOG, but the problem persist.
Sorry I can't really answer your question, but in Vista and 7 there is the newer Common Item Dialog. Maybe you can throw in an OS version check and display the proper dialog that way.
What directory are you trying to save to? It's possible that you need elevated priveledges. Does it work if you save to your documents or desktop or if you run your application as administrator?
It doesn't work in any directory, even the administrator privileges. Sometimes it works (once in a billion). It's crazy. I don't know what else to try.
Thanks!
Strange that it is solved as it seems to be the standard behavior in Windows 7. For example, I am currently browsing this website with Google Chrome. If I hit Ctrl+S, I get the Save As dialog with a filename pre-filled. If I delete the filename and then click Save, nothing happens, just like you described it.
So if you fixed it, you must have fixed it differently. Maybe you changed the dialog flags and don't remember?
In any case I fail to see an actual problem here. Why is it so important that the Save button work even without a filename?
no no the code is the same.. after pressing the "Save" button several times nothing happened.. if I wrote the name of an existing file, there were no problems! At code level never went out of the DoModal () method of CFilefialog.. Now, with build a new solution with the same cose, it seems to work.. although about 1 pc of 5 tested doesn't work correctly (on win7).