How to disable error message in file dialog?

How to disable error message in file dialog?

  • Suppose I have a Win32 C++ application that displays a save file dialog. Also suppose that I browse to C:\Windows (or some other protected location) and type a file name. Then suppose I hit save. What happens is I get a message saying I don't have permission to save there and would I like to save to My Documents instead. So here is the problem: my application knows this and can spawn a separate process to fire a UAC prompt and save to the folder. BUT the user cannot dismiss the save dialog until they choose an 'unprotected' (for lack of a better term) directory to save in. How can I disable this warning/error?

  • Answer:

    Try using the OFN_NOTESTFILECREATE flag.

George Edison at Stack Overflow Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.